summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-08-03 14:42:05 +0200
committerAndreas Gohr <andi@splitbrain.org>2013-08-03 14:42:05 +0200
commitafb2c08218345dc3604024c829a5c408e3f39277 (patch)
treefd912a383026921f00457a61465e2170dd67c2e2 /inc/template.php
parent354c39ffc9aa3bbd7d59d5e182a36d1f390c5b7e (diff)
downloadrpg-afb2c08218345dc3604024c829a5c408e3f39277.tar.gz
rpg-afb2c08218345dc3604024c829a5c408e3f39277.tar.bz2
allow for a style.ini in conf/<tpl>/style.ini
This is another go at what pull request #227 tried to do. This removes support for a style.local.ini in the template file in preference of a style.ini in the conf folder
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/inc/template.php b/inc/template.php
index ca1c8d9d5..f6eb488f5 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -33,11 +33,13 @@ function template($file) {
* This replaces the deprecated DOKU_TPLINC constant
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $tpl The template to use, default to current one
* @return string
*/
-function tpl_incdir() {
+function tpl_incdir($tpl='') {
global $conf;
- return DOKU_INC.'lib/tpl/'.$conf['template'].'/';
+ if(!$tpl) $tpl = $conf['template'];
+ return DOKU_INC.'lib/tpl/'.$tpl.'/';
}
/**
@@ -46,10 +48,12 @@ function tpl_incdir() {
* This replaces the deprecated DOKU_TPL constant
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @param string $tpl The template to use, default to current one
* @return string
*/
-function tpl_basedir() {
+function tpl_basedir($tpl) {
global $conf;
+ if(!$tpl) $tpl = $conf['template'];
return DOKU_BASE.'lib/tpl/'.$conf['template'].'/';
}