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.

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Controller-function to switch theme in one project

Go to End

2 Posts   1961 Views


Community Member, 12 Posts

26 August 2009 at 2:39am

Edited: 26/08/2009 2:49am

Hi there,

I'm workin on a project that suposed to switch the themes in two different categorys. Now I'm wondering how to do that, because each "root-category" has one subcategory with another subcategory with many pages. I thought I can write a function for the the Page_Controller to return one of the two root-categorys I'm currently in. So the Page.php would have an if-clause to include theme_1 or theme_2.

Is that possible and how? Or is there a better solution?

Thank you for help!


Community Member, 12 Posts

27 August 2009 at 12:39am

No ideas? Or is my question just too newbie-like? At the beginning I thought it would be possible to have different folders in "themes" like "mysite" and "mysite_theme1" and "mysite_theme2" but it didn't work because everything has to change. Content width, background-color...

hmmm.... :-/