Fallback to the default theme
if the configured one doesn't exist, fallback to "Default"
This commit is contained in:
parent
7739b2875d
commit
d6588573b0
1 changed files with 5 additions and 0 deletions
|
@ -98,6 +98,11 @@ class AntCMS
|
|||
{
|
||||
$currentConfig = AntConfig::currentConfig();
|
||||
$theme = $theme ?? $currentConfig['activeTheme'];
|
||||
|
||||
if (!is_dir(antThemePath . '/' . $theme)) {
|
||||
$theme = 'Default';
|
||||
}
|
||||
|
||||
$templatePath = antThemePath . '/' . $theme . '/' . 'Templates';
|
||||
$defaultTemplates = antThemePath . '/Default/Templates';
|
||||
|
||||
|
|
Loading…
Reference in a new issue