The Art of Joomla is a free resource for Joomla developers and artisans.

Artisan: a skilled worker who practices some trade or handicraft.

Written and maintained by Andrew Eddie - Joomla developer.

Sponsors

Banner
Banner
Issue 1

the Art of Joomla - Web Master Moments

Menu Alias Tricks

Written by Andrew Eddie

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".

9 Votes

6 Comments

Feed
  1. what about internatiolizations?
  2. You could do this in 1.0x by going to new menu item - and selecting seperator/placeholder, giving it a label of "resources" (to match your example above) and then making the menu items of 'teachers" and "students" and giving them the parent item of "resources" I have done this hundreds of times, seems to work perfectly, and you don't have to create that extra page. Not exactly a new thing to joomla, has actually been there for a while now.
  3. You could do this in 1.0x by going to new menu item - and selecting seperator/placeholder, giving it a label of "resources" (to match your example above) and then making the menu items of 'teachers" and "students" and giving them the parent item of "resources" I have done this hundreds of times, seems to work perfectly, and you don't have to create that extra page. Not exactly a new thing to joomla, has actually been there for a while now.
  4. Andrew you're a champ. Thanks so much for this. I was doing this by simply having the two items have the same alias (in the properties), but this is so much the better way. Cheers m8.
  5. Sorry, i can´t really follow your example, what is the special trick. Maybe my old school english is to blame here ;-) Could you please give a screenshot, of what you are doing? Thanx in advance.
  6. nice tutorial trick..... im from indonesia i try to do just like what you say... but i don't know why its not working for my website..... its be like this... http://cyberkosmik.co.cc/index.php?Itemid=76&option= would you help me.... sowry for my bad english....

Add Comment