Allow defining what theme to get the content of
This commit is contained in:
parent
c89c82fb64
commit
5562f9b676
1 changed files with 4 additions and 3 deletions
|
@ -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'];
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue