Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Themes

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Templates overriding from module does not work / 3.1


Reply

3 Posts   942 Views

Avatar
rob.s

12 July 2013 at 10:59pm (Last edited: 12 July 2013 10:59pm), Community Member, 78 Posts

Hi Folks,
the following causes headaches.

My SS3.1 project is in the project folder 't32base' (mysite is not used), that has a custom Page Class called "T32Page"
In this folder there is a template 'T32Page.ss'

t32base/templates/Layout/T32Page.ss

Now i have a custom theme called 'gpl' that itself has this template.

themes/gpl/templates/Layout/T32Page.ss

And SS3.1 picks the template from the module folder 't32base' not the one inside the theme folder.

I also tried to place it inside a sub-theme folder

themes/gpl_t32base/templates/Layout/T32Page.ss

Same result. SS picks the one from the module folder.

I deleted the cache folder and flushed all several times - with no success.

Any help or ideas would be really great!

Thanks in advance,
Robert

Avatar
badjedi

19 September 2013 at 4:13pm Community Member, 25 Posts

I am having the same issue, and luck?

Avatar
Nivanka

5 December 2013 at 6:22pm Community Member, 395 Posts

I was checking in the codes and saw that SilverStripe 3.1.2 was looking for the template files in the following order.

1. project folder (in most cases mysite)
2. theme
3. any

So this is the problem, I am not sure why this is done like this. emailing in the google group.