public function __construct() { parent::__construct(); $tpl = new Mtpl(array('M/Office/Templates/', APP_ROOT . 'app/' . APP_NAME . '/templates/', APP_ROOT . 'public/themes/' . Config::getPref('theme') . '/templates/')); $this->assign('output', $tpl->fetch('home')); $this->assign('__action', 'dyn'); }
public function get_part($file, $params = array(), $autoglobal = false) { $tpl = new Mtpl($this->_config['tplfolders']); if ($autoglobal) { $tpl->setVars($this->getVars()); } if (is_array($params)) { foreach ($params as $var => &$value) { if (is_object($value)) { $tpl->assignRef($var, $value); } else { $tpl->assign($var, $value); } } } return $tpl->fetch($file); }