liip/LiipThemeBundle — pull request #44 by AurelC2G (2012-07-07 19:19:22+00:00)
Title: Locating template files in Bundle/Resources/{theme}/views/

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Tests pass: yes
Test added for the new feature: yes

In my application, themes contain not only template files, but also assets (css, images...). Therefore, I want my themes to have the following structure:

myTheme/
views/
css/
...

However, the LiipThemeBundle currently looks for template files in Bundle/Resources/myTheme/, and not in Bundle/Resources/myTheme/views/.

This PR adds lookup in the views/ subdirectory of the themes, before looking at the root of the themes. It then fallbacks to the root of the theme, thereby avoiding BC breaks.

I added a test to check this behaviour.