function getTemplateInstance($templateDir = '/template') { $tpl = new Template(); $tpl->setCaching(false); $templateDir = BASE_PATH . $templateDir; $tpl->setTemplateDir($templateDir); $tpl->setSkin('default'); $tpl->debug = defined('APPLICATION_ENV') && (APPLICATION_ENV == 'development' || APPLICATION_ENV == 'testing'); return $tpl; }
/** * Returns a Template object loaded from a plugin template * Plugins are different in the sense that they store their templates in the * plugins/xxx/templates, where 'xxx' is the plugin identifier * * @param pluginId The id of the plugin, which matches the name of a folder * under the plugins/ folder. * @param templateName Name of the template, without the .template extension * @param blogInfo * @return a Template object * @see PluginCachedTemplate */ function PluginTemplate($pluginId, $templateName, $blogInfo = null) { // define the template file name $templateFolder = TemplateSetStorage::getPluginTemplateFolder($pluginId); $templateFileName = $templateFolder . $templateName . '.template'; $t = new Template($templateFileName); $t->setTemplateDir($templateFolder); $t->assign('templatename', $templateName); $t->assign('admintemplatepath', TemplateSetStorage::getAdminTemplateFolder()); $t->assign('plugintemplatepath', $templateFolder); // change a few things... $t = $this->_configureTemplateSettings($t, $blogInfo); return $t; }
/** * Gibt eine Smarty-Instanz zum rendern von Modul-Templates zur�ck * * @author Steffen Riedel <*****@*****.**> * @return Template */ public function getTemplate() { if (null !== $this->template) { return $this->template; } $template = new Template(); // override template dir $template->setTemplateDir(array('modules' => APPLICATION_ROOT . 'system/custom/frontend/templates/modules/')); return $this->template = $template; }