function __construct($params) { $params->set('gkmenu', 1); parent::__construct($params); $doc = JFactory::getDocument(); $doc->addStyleDeclaration('.gkcol { width: ' . $this->getParam('menu_col_width', 200) . 'px; }'); }
function genMenu($startlevel = 0, $endlevel = 10) { if ($startlevel == 0) { parent::genMenu(0, 0); } else { parent::genMenu($startlevel, $endlevel); } }
function __construct($params) { $params->set('gkmenu', 1); $template_params = JFactory::getApplication()->getTemplate(true)->params; parent::__construct($params); $doc = JFactory::getDocument(); $doc->addStyleDeclaration(' .childcontent { padding: ' . $template_params->get('submenu_padding', '16px') . '; } .childcontent .gkcol { width: ' . $this->getParam('menu_col_width', 200) . 'px; } '); }
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=\"gk-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=\"gksdl-subnav{$row->id}\"><li class=\"empty\"> </li></ul>"; } } } $this->endMenu($startlevel, $endlevel); } }
function __construct($params) { $params->set('gkmenu', 1); parent::__construct($params); }
function __construct(&$params) { parent::__construct($params); //To show sub menu on a separated place $this->showSeparatedSub = true; }