Separate display of SUB and MAIN menu items.

Written by Matt on 9 November 2009

Topics: Development tips

Q. Want a menu that only displays submenu items?

A. Change your CSS file so it will not display mainlevel items.

.mainlevel { display: none; }

When
you are using a separate main and submenu make a copy of the main menu
module. The copy should be named submenu and you should give it a class
suffix. (for example _sub).

When doing so the css should be as follows:

.mainlevel_sub { display: none; }
.sublevel  { display: none; }

The main menu will only display main items now.
The submenu only displays submenu items.

With the position setting, you can adjust the location where both menus will be displayed.

Get notified about new tips & tricks for Joomla:

RSS

Click here to subscribe via RSS feed


subscribe

Click here to receive updates via email

Leave a Comment Here's Your Chance to Be Heard!

CommentLuv Enabled

Subscribe without commenting

Joomla! is the registered trademark of Open Source Matters, Inc and Joomlatips.com is not affiliated with or endorsed by Open Source Matters, joomla.org or the Joomla! project.