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.

 

How to make a certain menu appear for a certain user?

How to make a certain menu appear for a certain user?

I am new with metamod and now totally confused...

I want a particular menu to appear for specific user, e.g.

Menu 1 for user1 when he is logged in
Menu 2 for user2 when he is logged in

Menu 1 should only been shown to user1 and no other user, similar rule to Menu 2

Are there any way to do this? I think all the menus are in module - I am using Joomla 1.5 and metamod 2-2c


Thanks a lot!

simpleality
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: How to make a certain menu appear for a certain user?

Hi simpleality,

Have you read the Quick Start guide?  http://www.metamodpro.com/metamod/quick-start

Just a couple of notes about menus: (1) MetaMod only controls modules. If your menu is in a module, then that's going to work. If it's somehow built in to the template code, then MetaMod isn't going to help you. (2) Menus tend to be the fussiest things in Joomla with regard to CSS styling (particularly for dropdowns). If you're trying to toggle a top horizontal menu with dropdowns, be prepared to have to purchase MetaMod Pro in order to get the styling right. If you're dealing with standard modules, perhaps in a left/right column, then these are not usually so fussy and you should be ok.

So:

1 - identify the different menu modules that you want to toggle. Go through each one of them, and "disable" them all. MetaMod will override that disabling later, when it includes one of them.

2 - set up a MetaMod in the module position where you want the menu to appear. Make sure the title is set to OFF.

3 - in the MetaMod, use a PHP rule like the following. you'll need to modify it to include your module ID numbers for the target modules.

if ($user->id == 101) return VVV;
if ($user->id == 102) return WWW;
if ($user->id == 103) return XXX;
if ($user->id == 104) return YYY;
if ($user->id == 105) return ZZZ;

Replace VVV-ZZZ with the module IDs that you want to display for the different users. Replace 101-105 with the user ids that will get those menu modules.

Cheers,
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

Re: How to make a certain menu appear for a certain user?

Hi Stephen,

Thanks a lot! That's make things much clearer.
Will try the recipe soon.

simpleality
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: How to make a certain menu appear for a certain user?

Hello,

I am using Joomla 1.5 and MetaMod 2.3.

I have tried this with no luck. I can only get modules to show for specific users if the module is enabled.

Put another way... If I disable Menu X, it doesn't show ever. If I enable Menu X, it shows on the left twice--once in the regular spot and again in the metamod spot.

What should I check?

UPDATE: Found the solution in another forum post. Setting the menu's Menu Assignment to none corrected it.

Thanks

gomodgo
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: How to make a certain menu appear for a certain user?

Yep, you found it :-) There are various ways to do this - setting to "none" works well, but you can also (1) set it to disabled, and make sure that you have "auto-enable included modules" turned on in MetaMod, or (2) put the module into a module position that doesn't actually appear on the page.

Cheers,
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:
1696
Total Polls:
6
Total Posts:
5941
Posts this week:
8
User Info:
 
Total Users:
5378
Newest User:
gary9131
Members Online:
0
Guests Online:
144

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