• Print
  • Email

Menu Alias Tricks

Labels: Menus

One of the annoying things I found in Joomla! 1.0 was that when you were building your menu, sometimes you just wanted a type of "heading" that didn't actually go anywhere but allowed you to open up some sub-menu items. Because you had to have something attached to the menu item, you had to create some content item that really didn't say much, or was the same as the first sub-menu item. It just seemed such a waste of a page, not to mention the fact that you then had two differrent menu items pointing to the same page.

Anyway, Joomla! 1.5 comes to the rescue with a little trick and a new type of thing you can add to a menu called an "Alias". When you create a new menu you are given four main options: a component, a URL, a ???, and a Menu Alias which is kind of like an internal link back to an existing menu item.

There are two really neat ways to use these menu alias's.

The first is a little trick to give you the effect of having an expanding menu without having to create that extra page. Let's say you want to create two menu items for Teachers and Students under a heading of "Resources". Here are the steps.

Create what will be your first sub-menu item, and call it Teachers but leave it at the top level. It can point to whatever you like - probably just an article.

Next create a new menu item but this time select the Menu Alias. Call it Resources and in the parameters select the Teachers item you just created and save.

Now, go back in and edit the Teachers menu item. Change the Parent to Resources and save.

Finally add your other "Students" menu item and parent it to "Resources".