ka var uztaisit kokveida navigaciju izmantojot Pear
Kods:
Gunkcija kas genere outputu:
function generateOutput(){ // fill output expression by module html code
$mtpl = new IntegratedTemplate($this->incs->modules->value."/".$this->getClassName()."/");
$mtpl->loadTemplatefile($this->getClassName().".tpl.html", true, true);
//$this->getTree();
$cat_array = Category::getChildren();
//$count_1level=sizeOf($cat_array);
foreach ($cat_array as $cat) {
$elem_id= $cat->getId();
echo $cat->getName()."<br>";
if ($cat->hasChildren($cat,active)) {
??????????????????? }
}
/*
$mtpl->setVariable("IMAGES", $this->html->image->value);
for ($i=0; $i<10;$i++) {
$mtpl->setCurrentBlock("bubu_block");
$mtpl->setVariable("BUBU",$i);
$mtpl->parseCurrentBlock("bubu_block");
}
*/
// $mtpl->touchBlock("address_area");
////////////////////////////////////////
// ******* END: MAIN CODE *************
////////////////////////////////////////
return $mtpl->get();
}