Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Disable menu item rather than hiding it?

Disable menu item rather than hiding it?

Hi there. Is there a way for Chameleon to make a menu item unclickable/inactive? I want the item to remain there, but unclickable, so the user knows it exists, but is unavailable to the user because of certain access privileges.

Thank you.

wjlow
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: Disable menu item rather than hiding it?

Hi Wklow,

that's a really great idea. At this stage there's no direct way to do this in Chameleon, sorry. As a general point, Joomla menu items don't have the ability to be disabled-but-still-there, so it's not like I can just bolt something into an existing mechanism and use Chameleon to switch it on and off.

I do have one idea of how you might achieve this, however.

One of the menu item types is a "separator". This allows you to use an image and/or text as a stand-in for a menu item.

Therefore, you could create a separator with the same text as the menu item next to it, then use Chameleon to switch off either the separator, or the menu item. e.g. in the Succeed action you could switch off the live menu item, leaving the "disabled"-looking separator, and in the Fail action you could switch off the separator, leaving the live menu item.

The only issue with doing this is getting the CSS right. The standard Joomla Menu module does this:

<ul>
<li class="item-nnn"><a href="whatever">Menu item 1</a></li>
<li class="item-mmm"><span class="separator">Your Separator Text</span></li>
</ul>

... therefore you would need to style your separators to look like the <a> tags except grayed-out, or whatever effect you are after.

You would also have to think about what happens with any *actual* separators that you wanted in your menu structure. Since individual CSS classes get added to each menu item, you could always target particular styles at particular menu items.

All in all I think this is a great idea!

Hope this helps,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Disable menu item rather than hiding it?

Stephen, sorry for the late response but thank you very much for this. Certainly a very helpful post. Thank you.

wjlow
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1684
Total Polls:
6
Total Posts:
5940
Posts this week:
1
User Info:
 
Total Users:
5161
Newest User:
kbmgkey234q
Members Online:
0
Guests Online:
133

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