Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Hiding Menu Item

Hiding Menu Item

Please can some one help me...
I trying to hide a menu item from a usergroup but can't work out how...

I need to hide menu item 209 from menuID 1 for usergroup 'Got Listing'

Any help would be great..
Thanks yikes)

stonesy
Beginner Modder
ranks
useravatar
Offline
1 Posts
User info in posts
Administrator has disabled public posting

Re: Hiding Menu Item

Hi Stonesy,

If you are using a standard mod_menu Menu Module, then you can do this in conjunction with ElastiMenu http://www.metamodpro.com/software/elastimenu

ElastiMenu is almost identical to a normal menu module, except that you can set up 1 or more menu items to hide.

You can therefore set up 2 ElastiMenus: one with the item hidden, and one without it hidden (or just use a standard menu module).

Then, use MetaMod to choose which one to display: display the ElastiMenu with the item HIDDEN if the user is in the "Got Listing" user group, and the other one if they are not in that user group.

You can use the following PHP snippet to detect the user group:

if ($core_genius->check("groups = Got Listing")) return XXX;
else return YYY;
// replace XXX with the module id of the module that hides the menu item,
// and YYY with the module id of the normal menu module.


If you are wanting to hide the menu item from a different type of menu, not one displayed in a module (e.g. a main menu from a template framework like T3 or Gantry) then this isn't going to work. In that case I'd recommend using Chameleon to do it. It's even easier to set up: you would just select the user group from the list of groups, then in the SUCCEED ACTION tab select the menu item that you want to hide.

Hope that helps,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1684
Total Polls:
6
Total Posts:
5940
Posts this week:
1
User Info:
 
Total Users:
5162
Newest User:
david30x73
Members Online:
0
Guests Online:
163

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked