I'm fairly new to Joomla and have a site with some menu troubles. My header menu looks as follows

  1. Menu1
  2. Menu2
  3. Menu3
  4. Menu4
  5. Menu5

Now I'm trying to set it up so that the menu across the top of the page displays all 5 elements. However, on the left side of the page, hides Menu2.

Under the Left Menu module, I selected Exclude under Assignments and selected the Menu2 element. However, it still appears on the page.

Am I misunderstanding how to hide elements of a menu?



I think you're misunderstanding the point of Menu Assignments. It's not a way to hide menu items, it's used to control where a particular module will be displayed or hidden. Based on the settings you mention above, if you click the menu2 item, the Left Menu module will probably not be displayed.

If you want to hide a particular menu item from the left menu, the simplest way is to use CSS. Without any code it's hard to say exactly how, but you have to find a way to target only your menu2 item, and hide it. Often, the menu items in Joomla uses the menu ID as class, and your HTML code could look something like this:

<li class="item132 ">
    <a class="item" href="/menu2">Menu 2 item</a>

If that's the case, you can hide the menu item by adding this line to your CSS code:

li.item132 { display:none; }
  • Ah, thanks for that! Definitely clarifies. However, simply using that CSS you listed would still hide it from both the top and side menu. I'd need to drill in even further and make it something like #rt-sidebar-a.li.item132, no?
    – Killnine
    Aug 22 '15 at 4:27
  • That's right, you probably need to use a more specific selector. Use the code inspector (by clicking "F12" or right-click -> Inspect element) in your browser to find the best way to select one of the menus only.
    – johanpw
    Aug 22 '15 at 17:57
  • Got it to work perfectly. I'll just drop this in my bucket of 'wouldn't it be nice if joomla...' things.
    – Killnine
    Aug 24 '15 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.