Feature: auto-load themes (previously templates) from plugins/*/themes/*

This commit is contained in:
slawkens
2024-01-25 23:06:10 +01:00
parent 0698e7b5f5
commit f719c02050
3 changed files with 38 additions and 1 deletions

View File

@@ -46,7 +46,14 @@ if(setting('core.template_allow_change'))
}
}
}
$template_path = 'templates/' . $template_name;
$themes = Plugins::getThemes();
if (isset($themes[$template_name])) {
$template_path = $themes[$template_name];
}
else {
$template_path = 'templates/' . $template_name;
}
if(file_exists(BASE . $template_path . '/index.php')) {
$template_index = 'index.php';