Exemple #1
0
 function __construct($params)
 {
     $params->set('gkmenu', 1);
     parent::__construct($params);
     $doc = JFactory::getDocument();
     $doc->addStyleDeclaration('.gkcol { width: ' . $this->getParam('menu_col_width', 200) . 'px; }');
 }
Exemple #2
0
 function genMenu($startlevel = 0, $endlevel = 10)
 {
     if ($startlevel == 0) {
         parent::genMenu(0, 0);
     } else {
         parent::genMenu($startlevel, $endlevel);
     }
 }
Exemple #3
0
 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; }
     ');
 }
Exemple #4
0
 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;
     }
 }
Exemple #5
0
 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\">&nbsp;</li></ul>";
                 }
             }
         }
         $this->endMenu($startlevel, $endlevel);
     }
 }
Exemple #6
0
 function __construct($params)
 {
     $params->set('gkmenu', 1);
     parent::__construct($params);
 }
Exemple #7
0
 function __construct(&$params)
 {
     parent::__construct($params);
     //To show sub menu on a separated place
     $this->showSeparatedSub = true;
 }