The Joomla! Forum ™





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: itemID
PostPosted: Wed Nov 09, 2005 9:58 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Oct 10, 2005 2:08 pm
Posts: 52
Greetings All

What is the purpose of itemID in the URL strings? i.e. index.php?option=com_content&task=view&id=14&Itemid=12

Also, what determines this id? I know what determines id and where to find the id for the item but not sure on this with regards to itemID. Thank you for your help.


Top
 Profile  
 
 Post subject: Re: itemID
PostPosted: Wed Nov 09, 2005 11:14 am 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 8:53 am
Posts: 812
Location: Switzerland
Itemid is a particularity of Joomla/Mambo... that some people find useful and others not... ;) So I'll try to give a neutral answer (my own understanding and opinion only):

It's in fact the menu id.

In my understanding, it serves three purposes:

1) to make Joomla display the correct menu item and link corresponding to what has been clicked.
- This is useful if you have more than 1 menu item corresponding to a content item.
- But if you click a content item navigation, it has the reverse effect to NOT highlighting the corresponding menu item (if you have one)

2) to help for the implementation of the "Back" button (not sure of that one)

3) to check for the permissions of that access to that content item from that menu/link using the menu-item access permission setting
- This is useful if all menu items & all links have correct settings
- It is a major source of errors in admin configurations
- It is a week access permissions control, that the better 3PD components double with their own access permissions checkings.

EDIT: And a fourth (fergotten completey! even if I knew it !): adding also here to complete the list for further reference:
alwarren wrote:
...
4)  It is the foundation for displaying modules. Itemid determins which module is displayed on a page. When you select a menu item from the module edit screen, it adds the menu item id(s) and the module id to the #__modules_menu table. That table is checked each time a page is displayed to determine whether a module should be displayed or not based on Itemid and the modules id.


Itemid has also an side effect that you can see better when activating SEF and even better when using a joomla-URL compliant SEF extension like 404sef: each page may have more than 1 url to it, if there is more than in total one of either menu item or link to it. Some people believe that if there are more than a few pages with different URLs but with same content, it might decrease your ranking on search engines. With up to 3-4 different links, I haven't seen this (one of my such sites has rank 3-30 of 30'000'000 pages, but I didn't try with 30 different itemIds. ;))

Dear Core-team:
- please correct me/complete the list above if incomplete or inaccurate ;)
- For the main purpose ( 3) ) it would be highly desirable to solve that problem (and increase site security) for the content itself without looking at the menus permissions. Maybe part of ACLs step 2 ? ;)

_________________
Beat 8)
www.joomlapolis.com <= Community Builder + CBSubs Joomla membership payment system - team
hosting.joomlapolis.com <= Joomla! Hosting, by the CB Team


Last edited by Beat on Wed Nov 09, 2005 3:46 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: itemID
PostPosted: Wed Nov 09, 2005 12:35 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Oct 10, 2005 2:08 pm
Posts: 52
Thank you Beat  8)


Top
 Profile  
 
 Post subject: Re: itemID
PostPosted: Wed Nov 09, 2005 3:31 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Aug 19, 2005 9:27 am
Posts: 247
Beat left out the most important reason for Itemid. It is the foundation for displaying modules. Itemid determins which module is displayed on a page. When you select a menu item from the module edit screen, it adds the menu item id(s) and the module id to the #__modules_menu table. That table is checked each time a page is displayed to determine whether a module should be displayed or not based on Itemid and the modules id.

_________________
Al Warren
National Volunteer Partner
American Red Cross

Coordinated Assistance Network
http://can.org


Top
 Profile  
 
 Post subject: Re: itemID
PostPosted: Wed Nov 09, 2005 3:55 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 8:53 am
Posts: 812
Location: Switzerland
alwarren wrote:
Beat left out the most important reason for Itemid. It is the foundation for displaying modules. Itemid determins which module is displayed on a page. When you select a menu item from the module edit screen, it adds the menu item id(s) and the module id to the #__modules_menu table. That table is checked each time a page is displayed to determine whether a module should be displayed or not based on Itemid and the modules id.


You are right :)

Fergot that one (even if I knew it). Sorry. Added it with quotation to my list of my previous post !

But I still believe that the navigation buttons in category/sections/articles lists&blogs should not post individual itemids of the parent category or section but refer to the ones of the corresponding menus, if they exist and are unique. This would reduce considerably multiple URLs for the same page — and display better the corresponding modules ;) .

_________________
Beat 8)
www.joomlapolis.com <= Community Builder + CBSubs Joomla membership payment system - team
hosting.joomlapolis.com <= Joomla! Hosting, by the CB Team


Top
 Profile  
 
 Post subject: Re: itemID
PostPosted: Wed Nov 09, 2005 4:58 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Oct 10, 2005 2:08 pm
Posts: 52
Thanks for all your info. One more question, where can I find the list of itemID's? In the database? If so, where, in which table? Probably not so important to me on my current project but I would like to know none the less. Thanks!


Top
 Profile  
 
 Post subject: Re: itemID
PostPosted: Wed Nov 09, 2005 5:46 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Aug 19, 2005 9:27 am
Posts: 247
Itemid is the id column of the #__menu table.

_________________
Al Warren
National Volunteer Partner
American Red Cross

Coordinated Assistance Network
http://can.org


Top
 Profile  
 
 Post subject: Re: itemID
PostPosted: Wed Nov 09, 2005 9:39 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Oct 10, 2005 2:08 pm
Posts: 52
Thanks Q&T


Top
 Profile  
 
 Post subject: Re: itemID
PostPosted: Fri Nov 11, 2005 4:10 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Thu Aug 18, 2005 9:27 am
Posts: 1317
Location: Toowoomba, Queensland, Australia
It is also used to define the pathway as well (which is built from the menu structure).

_________________
Sam Moffatt
Dev WG: Update and Install Technologies, Authentication Systems
S&I WG: Package Builder Maintainer, JoomlaCode Backend Systems
Simplest way to update your site: http://extensions.joomla.org/extensions ... llers/9332


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group