Jump to:

23480 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » new Page Types not being applied as templates

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 978 Views
  • bobdobbs
    Community Member
    6 Posts

    new Page Types not being applied as templates Link to this post

    Hi guys.
    I'm going through the tutorials, and I'm working with silverstripe 2.3.1.

    If I understand tutorial 1 correctly, you can enable a new page type with this flow:

    Create NewPageType.php file under code/mysite,
    rebuild db,
    create new template,
    flush cache,
    associate the new page type to any given page in the cms

    However, when I then request the page for that I've set to have my new page type from my browser, I get the page with the default template.

    What am I missing ?


  • baba-papa
    Community Member
    279 Posts

    Re: new Page Types not being applied as templates Link to this post

    If the template has the same name as the new Model/Controller file the framework will use it to render the controllers data. The template consitst of two files, eg the Page.php uses the template Page.ss and layout/Page.ss (case sensitive).

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.