From 383a53f459aaeed3cad97bfbcf22d22a7be87de9 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 3 Jan 2011 20:53:49 +0000 Subject: made include hooks more flexible (especially for farms: put included file into conf directory) --- tpl_functions.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tpl_functions.php') diff --git a/tpl_functions.php b/tpl_functions.php index 784813272..cadf400e4 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -93,3 +93,19 @@ function _tpl_getFavicon() { return ml('favicon.ico'); return DOKU_TPL.'images/favicon.ico'; } + +/** + * Include additional html file from conf directory if it exists, otherwise use + * file in the template's root directory. + * + * @author Anika Henke + */ +function _tpl_include($fn) { + $confFile = DOKU_CONF.$fn; + $tplFile = dirname(__FILE__).'/'.$fn; + + if (file_exists($confFile)) + include($confFile); + else if (file_exists($tplFile)) + include($tplFile); +} -- cgit v1.2.3