Smarty:
$arCustomTemplateEngines Smarty:
global $arCustomTemplateEngines; $arCustomTemplateEngines = array( "smarty" => array( "templateExt" => array("tpl"), "function" => "SmartyEngine" ), );
SmartyEngine Smarty (. Smarty). Smarty , , .., Smarty: function SmartyEngine($templateFile, $arResult, $arParams, $arLangMessages, $templateFolder, $parentTemplateFolder, $template) { if (!defined("SMARTY_DIR")) define("SMARTY_DIR", "< Smarty>/libs/"); require_once( '< Smarty>/libs/Smarty.class.php' ); $smarty = new Smarty; $smarty->compile_dir = "< Smarty>/templates_c/"; $smarty->config_dir = "< Smarty>/configs/"; $smarty->template_dir = "< Smarty>/templates/"; $smarty->cache_dir = "< Smarty>/cache/"; $smarty->compile_check = true; $smarty->debugging = false; $smarty->assign("arResult", $arResult); $smarty->assign("arParams", $arParams); $smarty->assign("MESS", $arLangMessages); $smarty->assign("templateFolder", $templateFolder); $smarty->assign("parentTemplateFolder", $parentTemplateFolder); $smarty->display( $_SERVER["DOCUMENT_ROOT"].$templateFile ); } "< Smarty>" Smarty.
2 - 2 3 | . | 1 2 3 | . |