marin4x Posted September 8, 2004 Report Posted September 8, 2004 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(); }
Gacha Posted September 8, 2004 Report Posted September 8, 2004 Kur tev glabasies tie sadaļu nosaukumi? Ja DB, tad izdoma no sākuma vienkāršu struktūru. Ķipa [nosaukums][sadalja][apakshsadalja-1][apakshsadalja-2]..... Un velkot ara ar pareizu SQL tu dabūsi ko tev vajaga :)
Gacha Posted September 8, 2004 Report Posted September 8, 2004 Vai tik tu nepretendē uz šito darbu :D
Recommended Posts