Location: PHPKode > projects > simpleMVC > myGifts/includes/smarty/libs/plugins/compiler.displayBlock.php
<?php
function smarty_compiler_displayBlock($tag_arg, &$smarty)
{
	if (ereg ("name=\"(.*)\"", $tag_arg, $regs)) {
	    $action = $regs[1];

		if (ereg ("id=\"?([^ ]*)\"?", $tag_arg, $regs))
		    $id = $smarty->_parse_var($regs[1]);
		else
			$id = "\"\"";

		$returnValue = "\$_smarty_tpl_vars = \$this->_tpl_vars;
\$object = Controler::getObject(\"$action\", $id);
\$this->assign(\"object\", \$object);
\$this->_smarty_include(\"$action.tpl\", array());
\$this->_tpl_vars = \$_smarty_tpl_vars;
unset(\$_smarty_tpl_vars);\n";

		return $returnValue;
	}
}
?>
Return current item: simpleMVC