function genMenu($startlevel = 0, $endlevel = 10) { if ($startlevel == 0) { parent::genMenu(0, 0); } else { parent::genMenu($startlevel, $endlevel); } }
function __construct(&$params) { $params->set('megamenu', 1); parent::__construct($params); if (!$this->getParam('menuname')) { $this->setParam('menuname', 'ja-megamenu'); } }
/** * Generate menu item * * @param object $item Menu item * @param int $level Level of menu item * @param string $pos Position of menu item * @param int $ret Return or show data * * @return mixed void if ret = 1, otherwise string data of menu item generating */ function genMenuItem($item, $level = 0, $pos = '', $ret = 0) { $data = parent::genMenuItem($item, $level, $pos, true); if (@$this->children[$item->id]) { $tmp = $item; $data .= "<a class=\"ja-folder\" href=\"#nav{$tmp->id}\" title=\"{$tmp->name}\">></a>"; } if ($ret) { return $data; } else { echo $data; } }
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=\"jasdl-subnav{$row->id}\"><li class=\"empty\"> </li></ul>"; } } } $this->endMenu($startlevel, $endlevel); } }
/** * Constructor * * @param array &$params An array parameter * * @return void */ function __construct(&$params) { parent::__construct($params); //To show sub menu on a separated place $this->showSeparatedSub = true; }
/** * Generate menu item * * @param object $item Menu item * @param int $level Level * @param string $pos Position * @param int $ret Return or not * * @return string Menu item markup */ function genMenuItem($item, $level = 0, $pos = '', $ret = 0) { //if ($level) return parent::genMenuItem($item, $level, '', $ret); //else return parent::genMenuItem($item, $level, $pos, $ret); }
function __construct(&$params) { $params->set('megamenu', 1); parent::__construct($params); }