Joomla component menu itemID?

In the code that generates the links in the component you need to append the ItemId to the url. You can get the ItemId using.

In the code that generates the links in the component you need to append the ItemId to the url. You can get the ItemId using: $itemid = JRequest::getint( 'Itemid' ); So you would use this in such a fashion (as an example): $link = JRoute::_('index. Php?

Option=com_component&task=list&Itemid='. $itemid); This var will exist once the menu item has been clicked. It then needs to be carried through each view in the component if the views sit in a hierarchical fashion where one view links to the next.

EDIT You could create a helper function that for the example above, automatically adds the ItemId to every link you generate e.g. Function genLink($link) { return JRoute::_($link. '&Itemid='. JRequest::getint( 'Itemid' )); }.

Yes, I know that I can add it by hand however Joomla should handle it – miojamo Nov 23 '10 at 13:42 1 It does handle it but only once it displays your component from the 1st menu click, then it is left to you to add the ItemId to the url when linking to different views in your component. Some components perhaps do not need the use of ItemId so to force the use of it wouldn't be ideal. It makes it more flexible and to add it by hand is not such a big deal.

– Martin Nov 23 '10 at 13:46.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions