Switching themes

Permalink
Can I put something in my header to change the active theme? Either a click here to change it or if an attribute is set to a particular setting?

Thanks

pvernaglia
 
ScottC replied on at Permalink Reply
ScottC
found this:

/**
       * set theme takes either a text-based theme ("concrete" or "dashboard" or something)
       * or a PageTheme object and sets information in the view about that theme. This is called internally
       * and is always passed the correct item based on context
       * 
       * @access public
       * @param PageTheme object $pl
       * @param string $filename
       * @param boolean $wrapTemplateInTheme
       * @return void
      */   
      private function setThemeForView($pl, $filename, $wrapTemplateInTheme = false) {
         // wrapTemplateInTheme gets set to true if we're passing the filename of a single page or page type file through


So you'll want to grab an instance of the view using $v = View::getInstance();
$v->setThemeForView('the magic goes here','filename goes here');