<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Page comments</title>
		<link>http://www.ssbits.com/home/</link>
		<atom:link href="http://www.ssbits.com/home/" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2009/create-a-front-end-theme-switcher/#PageComment_1829</link>
			<description>This didn't work for me, so I came up with my own solution ( SS v.2.4.7) :
1. Added private var $_config to Page class
2. Added following code to Page_Controller::init()
     $this-&gt;_config = SiteConfig::current_site_config();
3. ThemeSwither function:
public function ThemeSwitcher()
    {
        $themes = $this-&gt;_config-&gt;getAvailableThemes();
        $selected = SSViewer::current_theme();
        $fields = new FieldSet(
                        new DropdownField(
                                'theme',
                                'Theme',
                                $themes,
                                $selected)
        );
        $actions = new FieldSet(
                        new FormAction('SwitchTheme', 'Switch')
        );
        return new Form($this, 'ThemeSwitcher', $fields, $actions);
    }
4. SwitchTheme function:
public function SwitchTheme($data)
    {
        if ($data['theme']) {
            SSViewer::set_theme($data['theme']);
            $this-&gt;_config-&gt;Theme = $data['theme'];
            $this-&gt;_config-&gt;write();
        }
        Director::redirect(Director::baseURL() . $this-&gt;URLSegment);
    }
5. To allow switching in a theme use $ThemeSwitcher in template</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2009/create-a-front-end-theme-switcher/#PageComment_1829</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/tutorials/2009/create-a-front-end-theme-switcher/#PageComment_451</link>
			<description>I love this approach, and it's awesome if you're a total SS Nub like me but i'm having issues when switching themes. Would it be possible to get an example or where exactly i should be putting the $themeSwitcher call in each page.ss of my templates?</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/tutorials/2009/create-a-front-end-theme-switcher/#PageComment_451</guid>
		</item>
		

	</channel>
</rss>