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; }