made include hooks more flexible (especially for farms: put included file into conf directory)
This commit is contained in:
parent
b49f0667ba
commit
383a53f459
2 changed files with 21 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue