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