+ // setTemplateDir can be set to an array, which Smarty will parse in order.
+ // The order is thus very important here
+ $template_dirs = array('theme' => "view/theme/$theme/smarty3/");
+ if( x($a->theme_info,"extends") )
+ $template_dirs = $template_dirs + array('extends' => "view/theme/".$a->theme_info["extends"]."/smarty3/");
+ $template_dirs = $template_dirs + array('base' => 'view/smarty3/');
+ $this->setTemplateDir($template_dirs);