private function initSerpentTemplate($template_path, $vars) { // init serpent $serpent = new serpent(); $serpent->compile_dir = DIR_TEMPLATES_C; $serpent->force_compile = SERPENT_FORCE_COMPILE; $serpent->default_resource = SERPENT_DEFAULT_RESOURCE; $serpent->default_compiler = SERPENT_DEFAULT_COMPILER; $serpent->setCharset(SERPENT_CHARSET); // init resource $serpent->addPluginConfig('resource', 'file', array('template_dir' => DIR_TEMPLATES, 'suffix' => '.tpl')); $vars['shumvc_app'] = $this->getShumvcVars(); // render template with data $serpent->pass($vars); return $serpent->render($template_path); }