function genMenu($startlevel = 0, $endlevel = 10) { if ($startlevel == 0) { parent::genMenu(0, 0); } else { parent::genMenu($startlevel, $endlevel); } }
function genMenu($startlevel = 0, $endlevel = 10) { if ($startlevel == 0) { parent::genMenu(0, 0); } else { $this->setParam('startlevel', $startlevel); $this->setParam('endlevel', $endlevel); $this->beginMenu($startlevel, $endlevel); //Sub level $pid = $this->getParentId($startlevel - 1); if (@$this->children[$pid]) { foreach ($this->children[$pid] as $row) { if (@$this->children[$row->id]) { $this->genMenuItems($row->id, $startlevel); } else { echo "<ul id=\"gksdl-subnav{$row->id}\"><li class=\"empty\"> </li></ul>"; } } } $this->endMenu($startlevel, $endlevel); } }