Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions

Multiple Layouts


Reply

2 Posts   2096 Views

Avatar
tommyoneill

24 December 2008 at 3:43am Community Member, 1 Post

How do you create multiple layouts in one theme? Most sites I create have several layouts for different content types. How do we select different layouts?

Avatar
Liam

25 December 2008 at 6:06am Community Member, 470 Posts

Have you read the tutorials yet? http://doc.silverstripe.com/doku.php?id=tutorials

There is a special variable called $Layout which will rendered a specific template that matches a custom page type you have created.

You can also make multiple themes and call them per page using renderwith() http://doc.silverstripe.com/doku.php?id=templates&s=renderwith#calling_templates_from_php_code