Thursday, 14 October 2010 08:58

Joomla: What's in an ItemID?

I wish someone had written an article like this when I first started with Joomla.  It would have saved me a *LOT* of time.  The first thing that Joomla does, whenever it loads, is to check and see if an ItemID exists for a given page.  Normally, a Joomla link will include an "&ItemID=" statement, but not always.  If it doesn't, then Joomla will look for a match in the database.

An ItemID in Joomla effects all of the following:

- Component
- Modules
- Template
- Access Control (ACL)
- sef URL

...we will explain each in detail below.


Part 1: The Component

component-ids

This is the "main" content of the page that you are loading - whether it is your Contact form, an article, a blog category, or message board.

Settings will generally be here:
Components -> Your Component -> Configuration
Articles -> Parameters
Menus -> YourMenu -> Component -> Parameters

Files will generally be here:
/components/com_component/
/administrator/com_component/


Part 2: The Modules

module-assigned

Modules are what go above, below, and next to the component.  Examples include a search box, login form, current weather, custom HTML, and a listing of recent articles.

Settings are generally here:
Extensions -> Module Manager -> YourModule -> Parameters

Files are generally here:
/modules/mod_module/


Part 3: The Template

template_assigned

Most sites have a single template, so this will be brief. If your site runs multiple templates, you can assign them to ItemID's, so that a certain page (or pages) can use a different template than the rest of the site.

Helpful Tips:

  1. To show which modules are available in a given template, add ?tp=1 to the end of the URL.
  2. Make use of "Template Overrides" if you plan on tweaking component/module layouts.  Do NOT modify your core files!!!

Settings are generally here:
Extensions -> Template Manager -> YourTemplate

Files are generally here:
/templates/your_template/
(most importantly, the index.php and /css/ files)

Template overrides are here:
/templates/your_template/html/mod_yourmodule/
/templates/your_template/html/com_yourcomponent/


Part 4: Access Control (ACL)

acl_assigned

This only applies to sites that use the "login" system - something that your members sign into with a username and password.  There are 3 basic types of users:

  • Public - not logged in at all
  • Registered - logged in, usually with limited privileges
  • Special - logged in, with elevated privileges

Each menu item is assigned an access level.

Tip: If a component does not have its own built-in access control, you can often set up menu items to accomplish the same thing.


Part 5: the sef URL

sef-urls-global

Out of the box, a Joomla (1.5) URL will look like this:
yoursite.com/index.php?option=com_content&view=article&id=5:joomla-license-guidelines&catid=25:the-project&Itemid=2

If you enable the included SEF features, this URL will turn into something like this:
yoursite.com/the-news/1-welcome-to-joomla

If you use a 3rd-party extension like SH404sef (and I suggest that you do), sh404sef will also take into consideration the ItemID's when it builds a URL (and will also get rid of the additional and article ID in the SEF URL:
yoursite.com/the-news/welcome-to-joomla/


If you have additional questions (or corrections) about Joomla and its ItemID system, please leave them in the comments.
Nate Covington

Nate Covington

I work with advertising agencies and marketing consultants, as well as directly with business owners to build streamlined, effective web sites. The large majority of my projects are built using Joomla, although I also support Wordpress, Drupal, OSCommerce, and almost any other open-source platform.  If you are interested in hiring me, please send an email to natecovington (at) gmail (dot) com

Website: www.covingtoncreations.com E-mail: This e-mail address is being protected from spambots. You need JavaScript enabled to view it

Comment subscription

Receive email notification when a new comment is added to this item.

Add comment


About the Author

  • Nate Covington Nate Covington

    I work with advertising agencies and marketing consultants, as well as directly with business owners to build streamlined, effective web sites. The large majority of my projects are built using Joomla, although I also support Wordpress, Drupal, OSCommerce, and almost any other open-source platform.  If you are interested in hiring me, please send an email to natecovington (at) gmail (dot) com

JoomlaMarketing.org is not affiliated with or endorsed by the Joomla! Project.  It is not supported or warranted by the Joomla! Project or Open Source Matters.  The Joomla! logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.

The Joomla!(R) name is used under a limited license from Open Source Matters in the United States and other countries.