summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/template.php b/inc/template.php
index 2d465e3d3..1d55ab102 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -32,6 +32,21 @@ function ptln($string,$intend=0){
}
/**
+ * Returns the path to the given template, uses
+ * default one if the custom version doesn't exist
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function template($tpl){
+ global $conf;
+
+ if(@is_readable(DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl))
+ return DOKU_INC.'lib/tpl/'.$conf['template'].'/'.$tpl;
+
+ return DOKU_INC.'lib/tpl/default/'.$tpl;
+}
+
+/**
* Print the content
*
* This function is used for printing all the usual content