TemplatePower
Explanation
Get template file
/* temp solution before e107 templating to replace TemplatePower solution */
public function getTpl($filename) {
$sitetheme = deftrue('USERTHEME', e107::getPref('sitetheme'));
$themepath = e_THEME.$sitetheme."/skins/";
/*
$defaultskin = e107::getSingleton('efiction_settings')->getPref('skin'); //will be removed ???
$skinpath = _BASEDIR."skins/".$defaultskin."/";
*/
$default = "efiction_tpls/"; //new folder used to see what left
$defaultpath = _BASEDIR.$default;
if(file_exists($themepath.$filename)) $tpl = file_get_contents($themepath.$filename) ;
else $tpl = file_get_contents($defaultpath.$filename) ;
return $tpl;
} Add variables
TPL file
Actual tpl file
Parent tpl file
Replace $tpl
Last updated