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   1036 Views

Avatar
rob.s

Community Member, 78 Posts

12 July 2013 at 10:59pm

Edited: 12/07/2013 10:59pm

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

Community Member, 25 Posts

19 September 2013 at 4:13pm

I am having the same issue, and luck?

Avatar
Nivanka

Community Member, 400 Posts

5 December 2013 at 6:22pm

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.