3214 Posts in 848 Topics by 810 members
|Go to End|
11 August 2010 at 2:15pm
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
11 August 2010 at 9:15pm
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).
|Go to Top|