Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Change name of module from login to...
Change name of module from login to logout
Change name of module from login to logout
Hi,
I'm using Joomla 1.7 and MetaMod 3-5 (free version).
I'm using metamod on a yootheme template. I have placed the login form module in the "menu" module position so that it appears that the menu contains a menu item called "Login". I created a clone of the Login form module and named it "Logout". I used metamod to switch the 2 modules using the following PHP code:
if (MM_LOGGED_IN) return 93; else return 83;
However, when i place the metamod module in the same module position as the 2 login forms, the menu item name appears as "MetaMod" because that is the name of the metamod module. So, instead of the menu saying "login" or "logout", it says "MetaMod" for both modules.
How can I use metamod to make the titles of the login and logout modules appear?
I have the metamod title turned off and the login and logout module titles turned on, but the metamod title still shows.
26-Aug-11 21:56:39
Re: Change name of module from login to logout
Hi Cork,
I have a feeling that in this case, the YooTheme template is doing something kind of special with the "menu" module position. I think I have seen this before. It's not doing a normal "module position" instruction in the template, but going behind the scenes and grabbing information about the module out of the database.
In this case, MetaMod isn't going to work.
I have 2 other good alternatives:
1 - if your original (pre-MetaMod) module was a standard "mod_menu" module, then try replacing that with an Elastimenu module, available on this site. http://www.metamodpro.com/software/elastimenu
I don't know if this will work with the way that YooTheme is doing that main menu, but it might. The thing you can do with ElastiMenu (which is a drop-in replacement for mod_menu) is that you can select some of the menu items to only show when the user is a guest, and some that only show when the user is logged in. That way, your actual menu structure should contain menu items for guests AND logged-in users, but the ElastiMenu that displays them decides which ones to display at any given moment.
2 - Chameleon, also available on this site, can switch menu items on and off according to conditions. It's easy to make a condition that checks if the user is a guest. If the condition succeeds, then it can disable certain menu items. If it fails (i.e. the user is logged in) then it disables different menu items. This approach tends to work even when the ElastiMenu can't be used, e.g. if there's a completely different way of displaying the menu such as code in the template.
Hope that helps,
Stephen
Re: Change name of module from login to logout
Thank you Stephen. I'm not able to use Elasti Menu because I'm placing modules in the "menu" position. However, I'm on the verge of a solution.
Is there PHP code to hide the Metamod module after logging in?
Something like...
if ( MM_LOGGED_IN ) hide 47;
But this doesn't work.
Re: Change name of module from login to logout
Hi Cork,
I have a feeling that this approach isn't going to work, sorry. The Yootheme template is doing something strange/interesting with the module position that's not a "normal" Joomla thing. It's somehow converting modules into menu items. This means that the normal MetaMod thing of including other modules inside itself just isn't going to work with it.
I'm going to send you a PM requesting more info. Stand by...
Re: Change name of module from login to logout
Just for reference: I got this to work using MetaMod Pro.
The way that this works in the YooTheme Warp-based templates is that if you assign a module to the "menu" module position, the title of the module gets used as the name of a menu item, then the contents of the module is used as the drop-down from that menu item.
With standard MetaMod (non-Pro) this means that the name of the MetaMod itself is used as the menu item title, and there's nothing that you can do about it. It can't be turned off. The MetaMod can of course contain other modules, but that doesn't help the naming situation.
MetaMod Pro however DOES help. With Pro, the MetaMod itself disappears from the scene, and only the modules that the MetaMod includes get put into position (in this case the "menu" module position). They use all their own titles etc, just as if they were assigned to that position without the MetaMod being involved at all.
MetaMod Pro therefore is a good way to dynamically include/exclude modules being used as menu items in YooTheme Warp-based templates.
Cheers,
Stephen
Re: Change name of module from login to logout
had the same problem
Re: Change name of module from login to logout
Hi groove4x,
If you'd like help with this, please provide more information. Also please read the rest of this thread to see if it's the same situation that you have - in which case you should be able to follow the same procedure to get it to work.
Best regards,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Change name of module from login to...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7658
- Newest User:
- carre82601
- Members Online:
- 0
- Guests Online:
- 157
- 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