Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
Rockettheme Menus and Metamod
Rockettheme Menus and Metamod
Hello everyone.
First, metamod has been one the best modules I have come across for Joomla. Thanks a million!
I'm using a Rockettheme template (Synapse) for a site I'm working on. I have two types of users: registered users and non-registered users. I have two menus one for each type of user. When I have moomenu turned on in the template, for some reason one of the menus will not show up (which each menu is not named in the template). However, when I use the menu type "Toolbar Module Position" metamod works perfectly properly showing each menu at the correct times. Any idea why this might be?
Thanks for your help.
Thanks,
Jeff
Re: Rockettheme Menus and Metamod
Hi Jeff,
here's why.
When you use "Toolbar Module Position", Synapse does a completely traditional include of any modules loaded into the "toolbar" module position, and displays this as a menu. Therefore MetaMod works perfectly.
When you choose any of the other options (splitmenu/moomenu/suckerfish etc), Synapse does some clever stuff. It actually directly looks up a menu module to include, and dynamically sets the name of the "menu" to include in that module. It gets this name from a parameter that you can set in the Synapse template editing screen. It's the text field named "Menu Name" ("Name of Joomla! menu for the main navigation"). The default is "mainmenu".
So in this case I am afraid MetaMod isn't going to help you. And I don't get to say that often!
Instead I would make a small adjustment to the index.php of the Synapse template.
Look for the line that says:
Code:
$menu_name = $this->params->get("menuName", "mainmenu");
Replace it with the following:
Code:
$my_user =& JFactory::getUser();
if ($my_user->id == 0) $menu_name = $this->params->get("menuName", "mainmenu");
else $menu_name = "mainmenu_registered";
Then, edit your 2nd menu so that it has the name "mainmenu_registered", or just change the 3rd line above so that it contains the name of the actual menu you want to use for logged-in users.
The name of the menu we are talking about is the "type" column in the table of menus when you go to Menus->Menu Manager in the administrator section of your site.
So when no user is logged in, it will use the menu name as set in the backend of your Synapse template.
When a user is logged in, it will use the "mainmenu_registered" menu.
This is only when you're using Split/Moo/Suckerfish. If you're using the "toolbar" option then this won't have any effect (but you already know how to control that situation with MetaMod).
Hope that makes sense (and hope it works, since I didn't test it! But I think it will).
Stephen
Re: Rockettheme Menus and Metamod
Thank you so much. This worked perfectly. I have been stumped for a long time. Even though MetaMod didn't work in this situation, I will be purchasing MetaModPro in support of a great Joomla Module and a just as great developer. You're the man.
Thanks again!!!!
Jeff
Re: Rockettheme Menus and Metamod
Thanks Jeff for your feedback and for purchasing MetaMod Pro. I trust that you'll find plenty of great uses for it... browse the recipes page for ideas if you're stuck for ideas!
Cheers,
Stephen
Re: Rockettheme Menus and Metamod
Hi pastortrevor,
Are you using the Synapse template, or another one from Rockettheme, or another one entirely?
Also, are you changing the name of the module, or the name of the menu? It should be the name of the menu itself. Menus have several names, so when you are editing the menu itself (not the items within it), the name to change, I think, is the top one ("Unique name").
I hope that works for you... I haven't checked this, but I think it's right.
Cheers,
Stephen
Re: Rockettheme Menus and Metamod
Thanks for the response. I'm using Mixxmag from Rockettheme. I'm sorry for all the trouble I'm new to this. I did change the name of the actual copied menu, but for some reason it disappears. If I switch the order, place mainmenu in the third line and replace mainmenu in the code above with my menu, all that shows up is the main menu. Weird. Hope this is enough info. thanks
Re: Rockettheme Menus and Metamod
Ok, step by step, here's what to do:
To copy an existing menu:
1 - in Administrator, go to Menu Manager.
2 - select the radio button to the left of the menu that you want to copy
3 - click on the Copy button at the top
4 - in the box that appears there are 2 text fields: New Menu Title, and New Module Name.
5 - for the new menu title, you need to type in a name that's all lower case, with no punctuation or spaces. For the module name you can use any characters. For this example, type this into the top box: mainmenu_registered
You now have a menu that's a duplicate of your original, but called "mainmenu_registered". You can now add or subtract some items to/from this menu.
To make a brand new menu:
1 - in Administrator, go to Menu Manager.
2 - click on "New"
3 - you now have 3 text fields: Unique Name, Title, Description and Module Title.
Unique name: same as New Menu Title above. lower case, no spaces, no punctuation. This is the name you would use in your template's index.php (e.g. mainmenu_registered)
Title: a friendly title for your menu, to appear in the Menu Manager (any characters)
Description: any description you like
Module Title: any characters, the name of the module that will be created.
Now, as long as you used the top box when copying or creating a new menu, to give it the name "mainmenu_registered", you can use that in your template's index.php
Replace this line:
Code:
$menu_name = $this->params->get("menuName", "mainmenu");
with this:
Code:
$my_user =& JFactory::getUser();
if ($my_user->id == 0) $menu_name = $this->params->get("menuName", "mainmenu");
else $menu_name = "mainmenu_registered";
Re: Rockettheme Menus and Metamod
Hey thanks. It worked but now when logged in the menu doesn't have drop downs. It shows everything. Here's my site if you want to check it out ignitemyworld.comYou will have to register to see the new menu. I know it's something simple I just don't know what.
Re: Rockettheme Menus and Metamod
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7655
- Newest User:
- martha48
- Members Online:
- 0
- Guests Online:
- 118
- 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