Welcome to Alledia, the #1 Joomla Training Company

Would you like to learn Joomla? We're here to help you: Sign Up Today

  • Professionally-produced training videos and tutorials.
  • Guaranteed same-day answers to all your Joomla questions.
  • No Joomla experience needed. We've taught 1000s of Joomla students.

Home / Joomla Tips & Tricks / Understanding Joomla URLs and Itemids 
Mar
21
2007

Understanding Joomla URLs and Itemids

Written by Steve Burge   
Avatar

One of the most? frequently asked questions on the Joomla forums is "What is the Itemid and what does it do?". Its something that frustrates even experienced developers ... witness the post called "Damn you, infernal item IDs!!!" on WhyJoomla.com.

I thought a quick tutorial would be useful and along the way we can break down other aspects of Joomla URLs.

An Example Joomla URL and Itemid

Let's use a news item called "Joomla Weekly News Magazine Issue 10" written by Brian Teeman.

If you navigate to this news item via Joomla.org, you can see this URL in the browser bar:

http://www.joomla.org/content/view/2985/33/

You see this because inside the administrator section of Joomla.org, Search Engine Friendly URLs have been turned on (Site => Global Configuration => SEO => Search Engine Friendly URLs = Yes). Its a shorter version of the real URL produced by Joomla:

http://joomla.org/index.php?option=com_content&task=view&id=2985&Itemid=33

Breaking Down those Two URLs

Default URL
Default SEF URL
Other Examples
Component Name
option=com_content content option=com_wrapper produces a page using the wrapper component
This explains what the component is being asked to do.
task=view view

task=emailform allows you to send the page via email

do_pdf creates a PDF copy of the page

Number to identify the content item
id=2985 2985 Joomla starts at 1 and works up, so there have nearly been 3000 articles published on Joomla.org
Number to identify the menu link leading to the content item
Itemid=33 33
Joomla starts at 1 and works up. "What is Joomla?" is menu link number 26. "Submit Your News" is number 75.

What's the point of the Joomla Itemid?

The Itemid is what Joomla uses to decide which modules and templates need to appear on the page:

For example, the Itemid for Brian's article is 33. What happens if we change that to 26 for example?

http://www.joomla.org/content/view/2985/26/

  • The purple "News" template changes to the red "Main" template.
  • The "News" modules disappear and the "Main" modules appear instead.

We can do the reverse and make "What is Joomla?" appear to be a news item:

http://www.joomla.org/content/view/12/33/

When you open up the Template Manager and assign templates to a particular page or open up a Module and assign it to a page, it is the Itemid that does the work.

There is a limit to how much of this messing around you can do this on Joomla.org because the site is really 6 separate sites. Each site has its own Itemid structure. We can use the same URL as above to take us to a different page on each site:

This is one reason why we recommend that people use Open SEF, Artio SEF or SEF Advance ... lots of Joomla sites have identical URLs. A quick search on Google produces 450 pages with the same URL /content/view/12/33. If you want to stand out and help Google understand the content on your page, it helps to have a Search Engine Friendly URL Component installed.

The Future of the Itemid in Joomla

The Itemid setup is undergoing a substantial revision in Joomla 1.5. You can find out more in this post by Johan Janssens, Joomla's lead developer.

Free Weekly Joomla Tutorials

Your Comments (7)

0
Daniel Lew
June 14, 2008

It was the 1st thing I looked for when installing joomla, SEO friendly URL's.

Nice bit of information, thanks

0
Jacen
August 12, 2008

All well and good, but how do I write the PHP code to access the Itemids? THAT'S what I want to know.

0
Sana Nasir Shaikh
August 28, 2008

hi,i am using joomla for long time.but now i have discover a new problem.when i was creating a site map i saw one article with two different links but with same content . for exmaple

http://news.ebrandz.com/content/view/2006/568/
http://news.ebrandz.com/content/view/2006/1/

what is the problem ? even if i change last number 1 with any number it shows the same article .in this way sitemap contains 200 extra article.which is not good according to SEO.

can anyone tell me how can i solve this problem. thanks in advance


0
slav
September 01, 2008

I have the same problem like Sana Nasir Shaikh.

steve
Steve Burge
September 01, 2008

Hi Guys

The only way to solve that problem is with a plugin such as sh404SEF, Artio SEF or SEF Advance.

0
Jeff Foster
January 29, 2009

Hi Steve,

I got a hard question for you Steve:

My programmers are trying to figure out how to assign Menu Items to web pages through PHPMYADMIN in Joomla 1.5. Remember in 1.0 you could modify itemid's in PHPMYADMIN if the wrong menu or no menu was showing up.

When using sh404SEF, in 1.5 the URL does not include a item id.

How can one manually override / change the menu item in Joomla 1.5?

Jeff

0
joe456
September 12, 2009

thank you very much for sharing! I was having a problem with module, because in those link, I simply ignore the item id, so no module comes up. now i fix itsmilies/cheesy.gif

Write comment

 
  smaller | bigger
 

busy