Skip to content

Commit

Permalink
Fallback to default panel template
Browse files Browse the repository at this point in the history
  • Loading branch information
partydragen committed Jan 4, 2023
1 parent a0bbd68 commit 9c68c11
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/templates/backend_init.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
const BACK_END = true;

$template_path = ROOT_PATH . '/custom/panel_templates/' . PANEL_TEMPLATE;
$smarty->setTemplateDir($template_path);
$smarty->setCompileDir(ROOT_PATH . '/cache/templates_c');

if (file_exists(ROOT_PATH . '/custom/panel_templates/' . PANEL_TEMPLATE . '/template.php')) {
$smarty->setTemplateDir(ROOT_PATH . '/custom/panel_templates/' . PANEL_TEMPLATE);

require(ROOT_PATH . '/custom/panel_templates/' . PANEL_TEMPLATE . '/template.php');
} else {
$smarty->setTemplateDir(ROOT_PATH . '/custom/panel_templates/Default');

require(ROOT_PATH . '/custom/panel_templates/Default/template.php');
}

Expand Down

0 comments on commit 9c68c11

Please sign in to comment.