This commit is contained in:
Maurice Grönwoldt 2020-09-25 21:33:54 +02:00
commit f7fa124535
21 changed files with 388 additions and 58 deletions

View file

@ -84,7 +84,7 @@ class VenomRenderer
return $this->vars[$name];
}
public function deleteVar($name)
public function deleteVar($name): void
{
unset($this->vars[$name]);
}
@ -93,7 +93,13 @@ class VenomRenderer
{
$this->controller = $controller;
$data = Config::getInstance()->getRenderer();
$this->baseTemplate = $data->baseFile . '.php' ?? 'base.php';
$this->templateDir = __DIR__ . '/../../../tpl/' . $data->theme . '/';
$theme = $data->theme;
$base = $data->baseFile ?? 'base';
if (Config::getInstance()->isAdmin()) {
$base = 'base';
$theme = 'admin';
}
$this->baseTemplate = $base . '.php';
$this->templateDir = __DIR__ . '/../../../tpl/' . $theme . '/';
}
}