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.

 

Different Menu for Logged in users

Different Menu for Logged in users

I would like to show two different menus based on if the user is logged in or not. If a user is logged in, I would like to show a link to their PROFILE. If a user is logged out I would like to show a SIGN UP menu.

I followed the instructions provided but can't seem to get this to work. Can anyone help me please?

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

Re: Different Menu for Logged in users

Hi,

You've posted in the MetaMod forum, so I guess you've been using MetaMod for this. Things have gotten a bit easier for manipulating menu items if you actually use MetaTemplate instead. (free version is fine).

You want to achieve:

- the ability to show a menu item for logged-in users only (hiding the menu item for the SIGN UP), and for guests, hide the "Profile" menu item and show the SIGN UP menu item instead.

- these menu items are part of a larger menu.

correct?

HOW TO DO IT WITH METATEMPLATE

- download MetaTemplate (free) from http://www.metamodpro.com/metatemplate/download
- install it on your site
- set up your main (or whichever) menu with BOTH additional menu items: include the PROFILE menu item AND the SIGN UP menu item.
- Create a new rule in MetaTemplate. Call it something like "change menu items".
- in the main PHP box on the left, type the following:

if (MM_LOGGED_IN) return true;

- In the SUCCEED action on the right, in the "disable menus and menu items" box, select the SIGN UP menu item. This will disable that menu item for logged in users.
- In the FAIL action on the right, in the "disable menus and menu items" box, select the "PROFILE" menu item. This will disable that menu item for guests.

- save the rule. Finished.


Hope that helps!
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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10816
Newest User:
sakmy567q
Members Online:
0
Guests Online:
165

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