Thursday, 14 October 2010 18:58

Joomla: What's in an ItemID?

Written by 
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.

Read 1949 times Last modified on Thursday, 09 April 2015 15:41

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.