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   2121 Views

Avatar
tommyoneill

Community Member, 1 Post

24 December 2008 at 3:43am

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

Community Member, 470 Posts

25 December 2008 at 6:06am

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