By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

passing Itemid through Joomla controller object

P: 1
I display a list of previous user inputs differently based upon what menu item was clicked upon -- Joomla records this as Itemid.

When a user inputs something I am unable to retain the Itemid from the form in which they input the information, through the controller object and out to the display. I added the parameter "Itemid" with its value to the URL of the form and even put
Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" name="Itemid" value="[a #]" />
into the form elements. In the controller object I added
Expand|Select|Wrap|Line Numbers
  1. JRequest::setVar( 'Itemid', JRequest::getVar('Itemid')  );
  2.         parent::display();
. However, upon leaving the controller object, the Itemid always = 1.

?? How do I fix this ??

e.g. step-by-step
  1. User clicks on menu item 1 (Itemid=1), which displays both names and their corresponding values (e.g. "name" = "fred")
  2. User enters a name-value pair
  3. User sees a list of name-value pairs
  4. User clicks on menu item 2 (Itemid=2), which displays only names (e.g. "joe")
  5. User enters a name-value pair
  6. User sees a list of names: fred, joe
Mar 29 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.