Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » metamod in yootheme menu
metamod in yootheme menu
metamod in yootheme menu
I want to use a simple main feature of MetaMod. I want to display another menu for logged in users. I used that code and published the MetaMod in the menu-position. But look for your self what the problem is: http://www.spielpalast-hechingen.de/funpoint-start.html
The modulte title of MetaMod is appearing but I want to display the menu in the usual way. How can I achieve that? Is there something like "raw outout" or something else? It should look like this: http://schado3.msst.cc/
Testaccount: test/111111
Code:
if ( MM_LOGGED_IN ) return 136; /* the module id for logged-in users */
else return 123; /* the module id for non-logged-in users */
Best Regards
getimo
23-Feb-10 15:06:50
Re: metamod in yootheme menu
Hi Getimo,
Menu modules are notoriously difficult with respect to CSS. I think what's happening is that because of the extra MetaMod "surrounding" the menu module, the CSS for the menu just doesn't work like it did before. Also, many modern templates do very clever things with modules and class suffixes, so even the HTML generated with the nested MetaMod and menu module may be quite different to when the menu module is placed on the page independently.
(1) The easiest way to fix this is to get MetaMod Pro, which removes the MetaMod's HTML from the page, leaving only the target module. This should solve the problem immediately.
(2) There's a chance that you may be able to do it without MetaMod, but be prepared for a lot of experimentation and hassle. Here's what I would try:
- ensure that the title of the MetaMod is turned off
- set the "style for included modules" to "raw"
- try setting a CSS Class Suffix for the MetaMod to something like "metamod", that isn't a css class at all. In some templates, this will cause the "outer" MetaMod to lose the styling, then only the inner target module gets styled. To be honest, looking at the HTML that's being generated on your page, I don't hold out much hope for this. But it's worth trying.
- you could also try the opposite approach: check the CSS class suffix for the target menu (probably _menu), and set that class suffix for the MetaMod. You might then need to remove that suffix from the target module - try both ways.
I hope you can get this working with (2), but at least (1) is available and provides an instant fix.
Best regards,
Stephen
Re: metamod in yootheme menu
Hello Phil,
thanks again! I bought the MetaMod Pro and it just works - almost The menu active highlighting is not working properly for guests. The menu highlighting for logged-in users does work.
Here is what I did: This is one Joomla installation with 2 templates (websites). You can't go from one "website" to another one. I use MetaMod Pro for the second "website" with the second template. I created a main menu for this site then copied it and modified for logged in users (just hide a menu item).
Is the problem caused by copying the menu?
PS: Do we have to buy MetaMod for every single domain?
getimo
Re: metamod in yootheme menu
Hi getimo,
I think that the problem with active menu not being highlighted may be the result of copying the menu. When you copy a menu it makes a copy of the original menu item for each item, and this has a different Itemid. Therefore even if the 2 menu items are pointing to the same article, for example, they will be strictly different pages.
To get around this, you should recreate your "copy" menu by adding new menu items to a new menu, 1 at a time. Each menu link that should be exactly the same as the 1st menu, should be a menu "alias" to the corresponding link on the 1st menu. In this way, Joomla treats the 2 menu items as being completely identical.
I think/hope that will help. Please write back if you need more help with it.
With regard to the MetaMod Pro license: you do not need to purchase it for every domain. You can use it for as many domains as you like, as long as you do the installation yourself. You can't give it to other people though. See http://www.metamodpro.com/metamod-pro-license for the fine print.
Cheers,
Stephen
Re: metamod in yootheme menu
Hello Stephen,
thank you for your response. Unfortunately that was not the problem. The problem is really weird. We have several sections in joomla which are different "websites". We have a metamod (and 2 mainmenus) for every single "website". With one metamod it does work perfectly but if we create a second metamod the highlighting is like a random mechanism!? The idemid in the URLs are correct only the highlighting of the mehnu items are wrong. Maybe we can send you access to the website causing the problem just to make shure where to look (metamod or yootheme issue).
greets
getimo
Re: metamod in yootheme menu
Hi Getimo - sure, send me the URL. You can PM it if you don't want to put it on the forum.
If the site isn't officially launched yet, can you also turn on advanced debug mode on the MetaMods so that I can see the different Itemids? (or, if you have SEF mode turned off then that would work just as well).
Cheers,
Stephen
Re: metamod in yootheme menu
Hi Getimo,
I found the problem. In all of the menus that you were switching in and out, apart from the first one for non-logged-in users, you had the module cache turned to "Global", and the global cache turned on.
Therefore, each of the menu modules was caching its output, and that included the info (css class) about which item was highlighted.
Caching and active menu highlighting don't work well together! I turned all the caching to off, in each of the menu modules, and now they are all working properly.
So this wasn't really a problem with MetaMod, but a more general site caching issue.
Best regards,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » metamod in yootheme menu
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7638
- Newest User:
- moner86658
- Members Online:
- 0
- Guests Online:
- 124
- 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