What Is “ItemId” in a Joomla URL and Why It Is Important to Have It?

If you have been running a Joomla website for some time, you would have noticed the presence of a parameter called ItemId in your Joomla URLs. Curiously, the ItemId has nothing to do with the id of the article being displayed – so what is it and why is it there?

The ItemId is the ID of the menu item that a particular page belongs to. For example, if an article belongs to a certain category, then the ID of the menu item pointing to that category will be the Item ID of that page. Yes – we know – that sounds a bit complicated, but let us explain.

Let’s assume that you have a category called Products on your Joomla website. Let’s also assume that you have created a menu item pointing to the Products category in the menu item manager. The ID of that menu item will be the Item ID of any article belonging to the Products category, so, if the ID of the Products menu item (not the category) is 57, then the URL of a random page under the Products category would be something like the following:

http://www.yourjoomlawebsite.com/index.php?option=com_content&id=[article_id]&ItemId=57

But why is it necessary to have the ItemId?

Joomla, as you already know, allows you to assign modules (and templates) to menu items – and the only way that Joomla associates menu items with modules is through the ID of the menu item (this association is guaranteed by the table #__modules_menu) – this means that Joomla must know, for each page, the menu item ID for that page. That’s why we have the ItemId. So, in short, the presence of the ItemId parameter in the URL is necessary to tell Joomla which modules to assign to the page.

But, what about sh404SEF’s URLs? There’s no ItemId in those URLs, so how can Joomla manage?

Well, actually, sh404SEF‘s URLs do have the ItemID, but it’s sort of hidden. If you open up the URL of any link in sh404SEF‘s URL Manager, you will see the ItemId in the URL (note that the ItemId of the default URL of a certain page is the one that applies).

What if the ItemId is removed from the URL?

If you remove the ItemId from the URL of a certain page, then only those modules assigned to all pages or those assigned to all pages except those selected will display on that particular page.

Now, if you have problems on your Joomla URLs because of the ItemId or because of any other reason, then, as usual, we’re here to help. Feel free to contact us and rest assured that our work is professional and that our fees are extremely affordable. Oh, and we are very, very (we can’t stress very enough) friendly!

One Response to “What Is “ItemId” in a Joomla URL and Why It Is Important to Have It?”
  1. Comment by Alds — August 17, 2015 @ 2:32 am

    Eureka!!!

    This is the best article (and probably the only article) in the web that clearly explains the ItemId. Now I know what it’s about, and now I can confidently fix my broken site.

    Thanks a lot guys!!!

Leave a comment