tags:

views:

239

answers:

2

What exactly is the alias attribute of menu items used for in Joomla? In particular, are they suitable for uniquely identifying pages?

Update: I just realised that articles have alias' as well. I think that article alias' will be more useful

Related questions

A: 

Alias values are used to create nice URLs for pages. There is an explanation here:

The Alias you are speaking of goes with the Section, Category, or Article and there is also an Alias for Menu Item. That kind of Alias goes with the Name of each of those objects. When you name an Article, for example, you can let Joomla! automatically create the Alias. What Joomla! does is use the same value as the name you entered for the Article, except all of the spaces and special characters are removed and replaced with a dash.

Those Alias values are used to create URLs (if you activate the SEF URLs in your Global Configuration Utility.)

How the URL is created has to do with the Menu Type you selected. For an Article Layout Menu Type, your URL will be http://example.com/menu-alias.html

Alias' don't appear to be the best solution for a unique identifier as on a large enough site multiple documents might want to use the same alias. On a small site though, they can serve this purpose.

Casebash
+1  A: 

So you have two values available when you create an Article, the Title and the Alias.

If you don't set the alias Joomla will create a page URL based on the title of the page. By using the Alias you give your self more control over what the actual URL looks like. There are a number of reasons you might do this:

  1. The title of a page is long, so you can create a smaller alias. This a)makes the URL look nicer in the URL bar in a web browser b)makes it easier for a search engine such as google to display the whole URL in the search results without shortening it.

  2. It allows you to add keywords to the URL that might not appear in the actual Title of the page. When a search engine indexes the page it can also use the URL as a source of information regarding the content of a page. You can also help a user understand more about the content of a page, without needing to add keywords to your title.

Just my thoughts on this though. These are two of the main points I've picked up from using Joomla. This pretty much applies to other things in Joomla such as menus etc.

Binary Nerd