summaryrefslogtreecommitdiff
path: root/tpl_functions.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2011-01-03 20:53:49 +0000
committerAnika Henke <anika@selfthinker.org>2011-01-03 20:53:49 +0000
commit383a53f459aaeed3cad97bfbcf22d22a7be87de9 (patch)
tree04aea68b00af6c5334edc47fda0e4a60ac5e8053 /tpl_functions.php
parentb49f0667ba86f32655c5959b87d21090ee581b38 (diff)
downloadrpg-383a53f459aaeed3cad97bfbcf22d22a7be87de9.tar.gz
rpg-383a53f459aaeed3cad97bfbcf22d22a7be87de9.tar.bz2
made include hooks more flexible (especially for farms: put included file into conf directory)
Diffstat (limited to 'tpl_functions.php')
-rw-r--r--tpl_functions.php16
1 files changed, 16 insertions, 0 deletions
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 <anika@selfthinker.org>
+ */
+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);
+}