Welcome to the Compass Designs website, powered by Joomla 1.5! The goal of this new site is to be the place to bookmark if you are looking for quality Joomla templates, tutorials, news and tips.

Menus and Submenus in Joomla 1.5

Posted on Nov 12, 2006
Tagged in Untagged 

There are a number of great improvements to menus in Joomla 1.5. These are focussed on providing more flexibility to template designers and making Joomla sites more accessible and W3C valid. Specifically, significant improvments have been made to bulleted lists to now allow better submenus (for things like dropdown menus) and image replacement.

Menu and Module Class suffixes

These control the appearance of menus. All of the menus use CSS in the template to style how they look. By carefully coding the CSS, the menu’s appearance can be quickly and easily changed based on the suffixes used. An example of how this works might be different colored rounded boxes as shown below with our Joomlashack examples. These are four popular templates:


Joomla Menu Examples 

Menu Styles

There are two main ways to display your menu. One is to use a table for the layout (either vertical or horizontal) and the other is to use a bulleted list. In other tutorials I have discussed at length template design and how to make W3C valid websites. A big part of this is the subtle design differences between using tables or pure CSS for layout. This is getting technical, just know that you need to select whatever the template documentation calls for. Also, you can't have sublevels currently in 1.0.X with a flat list.

At the time of writing, Joomla 1.5 has legacy support for the previous way that a bulleted list was rendered (flat list) and a new way that allows more flexibility (list).

Thus there are currently 4 options:

  1. List - New method of showing a bulleted list
  2. Vertical - uses a vertical table
  3. Horizontal - uses a horizontal table
  4. Flat List - old method of showing a bulleted list

Submenus

Joomla has a feature where you can create submenus and they can be displayed in various ways. In the previous version of Joomla, it was not possible to have submenus if you were displaying your menu as a flat list. This was an issue as a bulleted list is a much more standards compliant method of displaying links.

In 1.5, this functionality is added to menus. It allows you to have submenus and flat lists. This is very important, as in the hands of a skilled template designer it allows you to do things like have dropdown menus and images for links without having to resort to JavaScript or tables, both of which are bad for accessibility, SEO and W3C compliance.

If "always show submenu items" is set to "yes" you get the out put shown below. Note that you MUST have the menu style selected as List.

<ul class="mainmenu"
<li class="level1 item1"
<a href="/"
</li
<li class="level1 item2"
<a href="/"
</li
<li class="level1 item3 parent"
<a href="/"

<ul
<li class="level2 item1"
<a href="http://www.compassdesigns.net"
</li
<li class="level2 item2"
<a href="http://www.joomlashack.com"
</li
</ul

</li
<li id="current" class="level1 item4 active"
<a href="/"
</li
</ul

Notice the new output. There are multiple classes on the <li

This feature is very welcome to the flexibility of menus in dev blog at the Joomla site.



Comments (1)add comment

mindshare said:

I don't see "list" as a choice in the drop-down for my mainmenu "Menu Style". Anf further when I select "Flat List" the menu still renders as a not
    . Am I missing something here?
December 19, 2006

Write comment
You must be logged in to a comment. Please register if you do not have an account yet.

busy

Get News, Tips and Coupons by Email

Did you enjoy this Compass Design blog post/tutorial?

Then sign up for regular monthly newsletter. I'll send you great tips on Joomla, email only offers and news from the Joomlasphere.

Email: First Name:

Book Your Joomla University Today

Need to learn about Joomla 1.5? Get Expert Joomla Training in New England.

Event
Date
Sign Up

Joomla University in Manchester, NH

Aug 22, 2008

Full

Joomla University in Boston, MA

Sep 19, 2008

Joomla University in Hartford, CT

Oct 03, 2008

Joomla University in Albany, NY

Oct 17, 2008

Find more posts tagged with...

Get Joomla Tips by RSS or Email


Register or login for free downloads



Get a Joomla 1.5 Website

Need a Joomla 1.5 Host?
Get a turnkey Joomla 1.5 website with full service support and education.

Joomla 1.5 Book

Get the "have to have book" about Joomla 1.5 from Amazon and free access to the companion site, joomlabook.com.

Who's Here

We have 168 guests online