// setTemplateDir can be set to an array, which Smarty will parse in order.\r
// The order is thus very important here\r
$template_dirs = ['theme' => "view/theme/$theme/" . SMARTY3_TEMPLATE_FOLDER . "/"];\r
- if (x($a->theme_info, "extends"))\r
+ if (x($a->theme_info, "extends")) {\r
$template_dirs = $template_dirs + ['extends' => "view/theme/" . $a->theme_info["extends"] . "/" . SMARTY3_TEMPLATE_FOLDER . "/"];\r
+ }\r
+\r
$template_dirs = $template_dirs + ['base' => "view/" . SMARTY3_TEMPLATE_FOLDER . "/"];\r
$this->setTemplateDir($template_dirs);\r
\r
if ($key[0] === '$') {\r
$key = substr($key, 1);\r
}\r
+\r
$s->assign($key, $value);\r
}\r
return $s->parsed($template);\r
$template_file = get_template_file($a, SMARTY3_TEMPLATE_FOLDER . '/' . $file, $root);\r
$template = new FriendicaSmarty();\r
$template->filename = $template_file;\r
+\r
return $template;\r
}\r
}\r