Allow defining what theme to get the content of

This commit is contained in:
Yağızhan 2023-01-07 17:25:12 +03:00
parent c89c82fb64
commit 5562f9b676

View file

@ -83,10 +83,11 @@ class AntCMS
}
}
public function getThemeContent()
public function getThemeContent($theme = null)
{
$currentConfig = AntConfig::currentConfig();
$themePath = antThemePath . '/' . $currentConfig['activeTheme'];
$theme = ($theme) ? $theme : $currentConfig['activeTheme'];
$themePath = antThemePath . '/' . $theme;
$templatePath = $themePath . '/' . 'Templates';
$themeContent['default_layout'] = file_get_contents($templatePath . '/default_layout.html');
$themeContent['nav_layout'] = file_get_contents($templatePath . '/nav_layout.html');
@ -153,4 +154,4 @@ class AntCMS
$currentConfig = AntConfig::currentConfig();
return $currentConfig['SiteInfo'];
}
}
}