Jump to:

3447 Posts in 1032 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » Bypassing the CMS

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

Page: 1
Go to End
Author Topic: 747 Views
  • te_chris
    Community Member
    24 Posts

    Bypassing the CMS Link to this post

    Thought i'd ask this as a new question

    So, I'm building this web app, but now I have a question about the templates: How does the template hierarchy work when one isn't extending site tree. like I know that i need to use render with, but can I still have a base template (i'm guessing name Controller.php) to represent the default rendering of the base controller class and then still use the $Layout placeholder to call the sub templates? obviously I don't want to have to write doctypes and headers into each template file, so my question is: how does one handle templates when just using controller?

    also as an aside, once i've got my app deployed i'm going to write about the process of using silverstripe for sapphire, not the cms, in the hope that it will convince more people to use and extend this very sweet php framework

  • Willr
    Forum Moderator
    5511 Posts

    Re: Bypassing the CMS Link to this post

    I assume a Controller.ss would be used failing everything. You may need to have your own render with on your base controller which returns a forTemplate (or renderWith) with array($this->class, 'Controller'); (class if its a subclassed controller or controller by default).

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.