[SOLVED] Hide "Login" menu item when logged in?

12 years 6 months ago - 12 years 5 months ago #181635 by tymcode
This is probably basic but I'm stumped.

I have a menu item that loads CB Login. I have a user type called Guest-only -- anything with that access level will not be seen once the user logs in. If I set that menu item to Guest-only, once the login is complete, the user can no longer see the CB login -- it actually returns an access error.

So how do I hide the menu item without denying access to the component that it displays? What am I missing?

Please Log in to join the conversation.

12 years 6 months ago - 12 years 6 months ago #181779 by krileon
Replied by krileon on topic Re: Hide "Login" menu item when logged in?
Joomla permissions don't work in reverse so you can't remove something by giving the user more permissions (e.g. going from Public to Registered). Only way to do this is with a dynamic menu, a menu module that has a specific spot for login/logout links, or template with specific module position. You could also use CB Content module and construct a menu with HTML as this will allow you to use substitutions so you could have dynamic links based off various profile credentials. It maybe possible on J1.7 with a new accesslevel that includes Public yet not Registered, but I haven't tried that.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 5 months ago - 12 years 5 months ago #181839 by pepperstreet
Replied by pepperstreet on topic Re: Hide "Login" menu item when logged in? | links
Related to this topic, some users might be interested in the following two articles:

J1.5 + MetaMod (by the way, MetaMod has many other how-to recipes )
Display Different Menu Items for Registered and Non-Registered Users Using MetaMod

J1.7 ACL
The Guest User Group - Hiding menu items and modules
The following user(s) said Thank You: nant, krileon

Please Log in to join the conversation.

12 years 5 months ago - 12 years 5 months ago #182221 by pepperstreet
Replied by pepperstreet on topic Re: Hide "Login" menu item when logged in? | links
just to make my last comment complete... a special mod_mainmenu from metamod people:

ElastiMenu
ElastiMenu is a Menu Module based on the standard Joomla “Mainmenu” module, with several key enhancements:

"It can combine more than one source menu. This makes it easy to mix-and-match menu items into one visible menu. e.g. you can have a main menu that doesn’t include login or logout items, then combine it with a menu that has one or the other, then display these at different times, all as a single module.

You can selectively exclude menu items from the menu. So if you want to exclude a certain menu item for certain pages, you can set up an ElastiMenu that uses the same source menu, but just excludes a certain item.

You can selectively include particular menu items, thus automatically excluding any items not mentioned in the list.
It’s compatible with MetaMod, so you can use MetaMod to programatically include/exclude certain menu items based on date/time/GeoIP/content/page etc."

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.198 seconds

Facebook Twitter LinkedIn