Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Themes
SilverStripe Forums » Themes » Subtemplates: possible to have more than one subtemplate region in a page template?
Discuss SilverStripe Themes.
|
Page:
1
|
Go to End | |
| Author | Topic: Subtemplates: possible to have more than one subtemplate region in a page template? | 463 Views |
-
Subtemplates: possible to have more than one subtemplate region in a page template?

6 June 2009 at 11:31am
I'm new to SilverStripe and have gone through the tutorials and much of the documentation. I'm trying to create a new theme, and am unsure how the subtemplates work. I would like to have more than one subtemplate block in my main Page.ss file (themes/mytheme/templates/Page.ss). From the tutorial, I understand that the $Layout tag will cause SS to use the relevant subtemplate in themes/mytheme/templates/Layout/ that corresponds to the current page type. But what do I do if I have multiple areas on the page that could use a subtemplate? For instance, I have a banner area that should have different content depending on the page type. I tried creating a new folder themes/mytheme/templates/Banner/ with the hopes that putting a subtemplate there would allow me to use a $Banner tag in themes/mytheme/templates/Page.ss to display this subtemplate. But that didn't work.
Is there a way to add an additional subtemplate region like this? Or is $Layout the only subtemplate tag available?
-
Re: Subtemplates: possible to have more than one subtemplate region in a page template?

7 June 2009 at 3:42pm
$Layout is currently the only subtemplate tag you can use.
| 463 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: JoshuaLewis, Euphemismus
Welcome to our latest member: fearofbuttons


