Skip to content

Commit d6af2bd

Browse files
author
vogelor
committed
Improved Template handling (if a template-file is not in the user template path, the file of the default-template is used)
1 parent 0f5973a commit d6af2bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/lib/classes/tpl_ini.inc.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ public static function vlibTemplate()
5050
{
5151

5252
$tpl_dir = ISPC_THEMES_PATH.'/'.$_SESSION['s']['theme'].'/templates';
53+
$def_tpl_dir = ISPC_THEMES_PATH.'/default/templates';
5354
return array(
5455

55-
'TEMPLATE_DIR' => $tpl_dir, // Default directory for your template files (full path)
56+
'INCLUDE_PATHS' => array($tpl_dir), // The path, searched BEVORE the template_dir is searched for the template-file
57+
58+
'TEMPLATE_DIR' => $def_tpl_dir, // Default directory for your template files (full path)
5659
// leave the '/' or '\' off the end of the directory.
5760

5861
'MAX_INCLUDES' => 10, // Drill depth for tmpl_include's

0 commit comments

Comments
 (0)