Esempio n. 1
0
 /**
  * Возвращает шаблон, 
  * заполненный данными переданными в параметре
  *
  * @param tpl $tpl
  * @param array $item
  * @return tpl
  */
 function getItem($tpl, $item)
 {
     $tplItem = $tpl->fetchBlock('BreadCrumbs');
     $tplItem->assign($item);
     $tpl->assign('BreadCrumbs', $tplItem);
     $tplItem->reset();
     return $tpl;
 }
Esempio n. 2
0
<?php

require_once '../class.tpl.php';
$tpl = new tpl();
$tpl->assign(array('hello' => 'Hello', 'world' => 'World'));
$tpl->display('index.tpl');