VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: 2dmaster on February 23, 2016, 11:02:08 AM

Title: Only specified VM MENU items in main menu
Post by: 2dmaster on February 23, 2016, 11:02:08 AM
Help please! Virtuemart 3.0.14.2 !j 3.4.8
Title: Re: Only specified VM MENU items in main menu
Post by: Ghost on February 23, 2016, 12:12:29 PM
Easy way is to create an array and do an in_array check. You can add a module parameter to easily configure included/excluded categories.
$excluded = array(1,2,42,etc);

if(!in_array($excluded)){
                        $this->tree .='<a href="'.$link.'">';
                        $this->tree .= $name;
                        if($isparent) $this->tree .='<i class="icon-angle-'.((JFactory::getDocument()->direction=='ltr')?'right':'left').' pull-right"></i>';
                        $this->tree .= '</a>';}