2863 Posts in 731 Topics by 699 members
Template Questions
SilverStripe Forums » Template Questions » how to implement change themes through GET?
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 995 Views |
-
how to implement change themes through GET?

30 January 2009 at 1:18pm
what I do to be able to change the theme on the demo site?
I made a few themes and want to make their demo site.
You have to demo site, themes can be changed through GET ?theme=:
http://demo.silverstripe.com/?theme=balance
But when I do so on my site, theme does not change
When I delet from _config.php line
SSViewer::set_theme('exotic');
and put in browser ?theme=exotic
I get
FATAL ERROR: None of these templates can be found: Page.ss, ContentController.ss
At line 74 in V:\home\solomija.net.ua\www\askold\sapphire\core\SSViewer.php -
Re: how to implement change themes through GET?

30 January 2009 at 1:25pm
pl's Close this tem l find resolution
http://www.silverstripe.org/archive/show/79233
//theme settings
if(isset($_GET['theme'])) {
$_SESSION['theme'] = $_GET['theme'];
}$theme = isset($_SESSION['theme']) ? $_SESSION['theme'] : 'yourdefaultthemehere';
| 995 Views | ||
|
Page:
1
|
Go to Top |

