Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Show submenu item when condition is true
Show submenu item when condition is true
Show submenu item when condition is true
Hi, I have a main menu, with a submenu item. I do not use Joomla users, instead I use directphp and my own user system because I have 3 types of users. Basically what I am trying to achieve:
Mainpage with no users logged in show 3 options:
Login (No submenu items should show)
Login for Managers (No submenu items should show)
Login fir Super admin (No submenu items should show)
When the users are logged in the following submenu's should show:
Login - (Item1, Item2, Item3)
Login for managers - (Item1, Item2, Item3)
etc.
My code looks like this:
Code:
if ($_SESSION['auth']) {
return 51,52;
}
if ($_SESSION['authman']) {
return 76,77;
}
where the 76,77 is the sub menu items
Re: Show submenu item when condition is true
MetaMod does not have direct control over individual menu items showing up in other modules. Basically it can just decide which other modules to display or not.
If you are using the standard mod_mainmenu modules to display your menus, then I made a drop-in replacement for mod_mainmenu called "Elastimenu". What you can do with Elastimenu is when you set it up, you can tell it some of the menu items to NOT display.
So what I'd do in your case is to create several Elastimenu modules, one for each situation (with different items not showing).
Then, use MetaMod to select which *module* will display or not.
Elastimenu is free and available from http://www.metamodpro.com/software/elastimenu
Hope that helps,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Show submenu item when condition is true
Board Info
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked