Пример #1
0
<?php

$smarty->assign("TEXT_VAR", $this->_out["text"]);
$smarty->assign("TITLE", $this->_out["title"]);
$menu = new LinksList($this->_arr["id"]);
$smarty->assign("MENU", $menu->makeMenu());
$smarty->assign("CHILDREN_MENU", $menu->getMenuChildren());
$smarty->assign("PATH", $menu->getPath());
$subSections = $menu->getSubSection();
$smarty->assign("SUB_SECTIONS", $subSections);
Пример #2
0
 /**
  * Отображает сайт на главном шаблоне
  * 
  * @param Sring $templatePath Выводимый модуль в папке engine/templates
  */
 public function view($templatePath)
 {
     $smarty = new SmartyExst();
     //$smarty->caching=true;
     //$smarty->debugging=true;
     //var_dump($out);
     $smarty->assign("TEXT_VAR", $this->_out["text"]);
     $smarty->assign("TITLE", $this->_out["title"]);
     $menu = new LinksList($this->_arr["id"]);
     $smarty->assign("MENU", $menu->makeMenu());
     $smarty->assign("CHILDREN_MENU", $menu->getMenuChildren());
     $smarty->assign("PATH", $menu->getPath());
     $subSections = $menu->getSubSection();
     $smarty->assign("SUB_SECTIONS", $subSections);
     try {
         $smarty->display($templatePath);
     } catch (Exception $ex) {
         echo "PROBLEM SMARTY >> KERNEL >> Can't load {$templatePath}";
     }
 }