1
0

tweak to support multiple engine: in info.txt of templates

This commit is contained in:
Garvin Hicking
2010-08-23 19:06:17 +00:00
parent 1dcda4f0a7
commit a7b27ff06a
2 changed files with 11 additions and 6 deletions

View File

@ -880,11 +880,13 @@ function serendipity_smarty_init($vars = array()) {
$serendipity['smarty']->debugging = true;
}
$serendipity['smarty']->template_dir = array(
$template_dir,
$serendipity['serendipityPath'] . $serendipity['templatePath'] . 'default',
$serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template_engine']
);
$serendipity['smarty']->template_dir = array($template_dir);
$p = explode(',', $serendipity['template_engine']);
foreach($p AS $te) {
$serendipity['smarty']->template_dir[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $te;
}
$serendipity['smarty']->template_dir[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . 'default';
$serendipity['smarty']->compile_dir = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE;
if (!is_dir($serendipity['smarty']->compile_dir) || !is_writable($serendipity['smarty']->compile_dir)) {