Hi,
I have a menu item (ID 54) I would like to be hidden for registered users.
I’ve read a suggestion here:
http://www.joomlart.com/forums/showthread.php?61182-MegaMenu-Hide-menu-item-for-logged-in-members&highlight=mega+menu+hide+menu+item
I replaced this code from plugins/system/jat3/jat3/core/menu/base.class.php
$this->beginMenuItem($row, $level, $pos);
$this->genMenuItem( $row, $level, $pos);
// show menu with menu expanded - submenus visible
if ($this->getParam('megamenu') && $row->megaparams->get('group')) $this->genMenuItems( $row->id, $level ); //not increase level
else if ($level < $this->getParam('endlevel')) $this->genMenuItems( $row->id, $level+1 );
$this->endMenuItem($row, $level, $pos);
with this one:
$active1 = $this->genClass ($row, $level, $pos);
$user = JFactory::getUser();
if (!($user->id != 0 && strstr($active1, "hidden") != NULL)){
$this->beginMenuItem($row, $level, $pos);
$this->genMenuItem( $row, $level, $pos);
// show menu with menu expanded - submenus visible
if ($this->getParam('megamenu') && $row->megaparams->get('group')) $this->genMenuItems( $row->id, $level ); //not increase level
else if ($level < $this->getParam('endlevel')) $this->genMenuItems( $row->id, $level+1 );
$this->endMenuItem($row, $level, $pos);
}
Unfortunately nothing happens.
I would like to know if I have to put my menu item somewhere in the code? How can I change the code for my menu Item with ID 54? (My template is Ja Methys, Joomla 1.5
Thank you in advance.