ElastiMenu

ElastiMenu is a Menu Module based on the standard Joomla “Mainmenu” module, with several key enhancements:

  1. It can combine more than one source menu. This makes it easy to mix-and-match menu items into one visible menu. e.g. you can have a main menu that doesn’t include login or logout items, then combine it with a menu that has one or the other, then display these at different times, all as a single module.
  2. You can selectively exclude menu items from the menu. So if you want to exclude a certain menu item for certain pages, you can set up an ElastiMenu that uses the same source menu, but just excludes a certain item.
  3. You can selectively include particular menu items, thus automatically excluding any items not mentioned in the list.
  4. It’s compatible with MetaMod, so you can use MetaMod to programatically include/exclude certain menu items based on date/time/GeoIP/content/page etc.

Instructions

  1. Download (see bottom of this page)
  2. Install as normal
  3. The setup is almost identical to a normal “mainmenu” module, except:
    1. You can select up to 3 “Source Menus” (the standard menu module restricts you to just 1)
    2. You can exclude certain menu items by ID
    3. You can exclude all menu items except for those listed

To obtain menu item ids, you can find them in the Menu Manager, in the right column for each menu item. These ids are also the same as the “Itemid” parameters often seen in the URLs of Joomla web sites. A future version of ElastiMenu will include a handy lookup table of menu item names and ids.

Using ElastiMenu with MetaMod

One feature of MetaMod is that you can dynamically alter the parameters of any module that MetaMod includes [or, with MetaMod Pro, the parameters of any module on the page].

The new parameters that ElastiMenu adds to a standard menu module are:

menutype1 the short name of the 1st menu to include (default “mainmenu”
menutype2 the short name of the 2nd menu to include
menutype3 the short name of the 3rd menu to include
exclusions a list of menu item ids (Itemids), comma-separated, to exclude from display
inclusions a list of menu item ids (Itemids), comma-separated. If you specify any menu items here, then all other menu items will be excluded, and only these ones will be shown.

E.g. you might use the following rule in MetaMod to exclude a couple of menu items for logged-in users:

// for logged-in users, exclude menu items 55 and 56 from ElastiMenu #23
if (MM_LOGGED_IN) {
  $changes->mod(23)->setParam("exclusions", "55,56");
}
return 23;

Alternatively, for logged-in users, include the “logout” menu at the end of the main menu:

// for logged-in users, add extra menu to ElastiMenu #23
if (MM_LOGGED_IN) {
  $changes->mod(23)->setParam("menutype2", "mylogoutmenu");
} 
return 23;

Download

# Documents Downloads Size MB Created Modified
1 ElastiMenu-1-0
First release of Elastimenu
127 0.012212 20.05.2010 20.05.2010