Home > Developments > Hiding a Menu Item in Joomla!

Hiding a Menu Item in Joomla!

Ever wanted to use a menu item to link to a particular article or component, but don’t actually what that menu item to appear on your site?

First, create a new menu from the Menu Manager in your Joomla! Administrator area and call it something like ‘hiddenmenu’.

Now proceed to add new menu items to this ‘hiddenmenu’ and be sure they are Published. You will likely want them to be publicly accessible too. This allows you to set menu specific parameters for items like content articles, contacts, components and more, without actually showing the menu item on your website.

Basically, that’s it. Using the JCE editor for Joomla!, edit or create an article. To add a link to the ‘hiddenmenu’, select the text to link and click the ‘Add Link’ button. The JCE editor will popup a window allowing you to select an item to link to. Select the ‘Menu’ option to display the available menus. Then, expand the one you created earlier called ‘hiddenmenu’. Finally, select the menu item you created and click on the Insert button.

Save your article and take a look.

Categories: Developments Tags: , ,
  • Pingback: Mozilla starts preparing developers for Firefox 3.6 | SataByte.com

  • http://onlinemarriagecounselor.org online marriage counseling

    Thanks for your informative post! :)

  • Malc

    Hi,

    I’ve used this technique and it is good for hiding menu items, but I discovered that you lose the breadcrumb trail consistency, which appears to be determined by the mainmenu.

    Any thoughts on how you can just hide the submenu item on a main menu?

    I wondered if you can hack the menu.php single out a menu item id and include a display: none; somewhere.

    Malc

  • http://kensleylewisproductions.com blackhawx

    bingo Malc,
    look at the view source of your menu on your web browser. Each menu item is assigned a class=”item_x” value. Find which from the menu you want to hide. For example, the third menu down may look like this…

    so just go into your stylesheet and write display:none for li.item3.

    You will have a well hidden menu item AND still access the page via the url.

  • RicRic

    Thanks blackhawx, this solution worked for me!

  • http://www.wildfibersmagazine.com Grumblegoat

    I’m close, but yet so far. I’m not sure I quite understand the exact steps. I have many articles that are in a sub menu, I don’t want all of those submenu items visible but I’m not sure from your directions EXACTLY what I should be clicking on. I tried clicking on the actual menu item while in the Joomla Menu Item Manager section, but when I then clicked on view source – oyyyy… it was a little scary looking for the item value you mentioned above. Would you mind maybe explaining this a bit more step by step for the real novices? I would be so very very grateful.

    Thanks.
    Grumblegoat

  • Desther

    Thanks a lot, that was exactly what i was looking for.