Jump to:

1347 Posts in 439 Topics by 514 members

Themes

SilverStripe Forums » Themes » Templates overriding from module does not work / 3.1

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 668 Views
  • rob.s
    Avatar
    Community Member
    78 Posts

    Templates overriding from module does not work / 3.1 Link to this post

    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

  • badjedi
    Avatar
    Community Member
    25 Posts

    Re: Templates overriding from module does not work / 3.1 Link to this post

    I am having the same issue, and luck?

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: Templates overriding from module does not work / 3.1 Link to this post

    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.

    668 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.