22870 Posts in 9579 Topics by 2803 members
|Go to End|
25 June 2013 at 8:29pm Last edited: 25 June 2013 8:30pm
Sorry if this seems like a dense question, but I can't figure it out. I have a particular page type that I want to bypass the default Page.ss template completely and use its own template (i.e. no layout inheritance - it needs to be completely different).
Can anyone tell me how to accomplish this? I tried putting an appropriately named template in the root 'templates' directory but it didn't work.
26 June 2013 at 1:13am Last edited: 26 June 2013 1:15am
It works like this; if a .ss file, with a matching name to current classname, is found in the root of the template folder, this file is used to render the data with. If this file contains $Layout the Layout folder folder inside the template folder is searched for a matching .ss file.
EDIT: If there is no .ss file matching the current ClassName in either of the above folders, folders will be searched for a .ss file with the parent classname - often Page.ss.
If you have a pagetype that you want to use a different master template for, put it directly in the themes/themename/templates/MyCustomPageClassHere.ss
NOTE: Remember to add ?flush=all to URL after changing template files.
Hope it helps
26 June 2013 at 6:02pm
Thanks so much for the reply! That was my understanding also, hence my confusion as to why it wasn't working.
Needless to say, I wasn't flushing the template cache - '?flush=all' solved the problem!
|Go to Top|