Hi all, thanks in advance for your help.
I have a site that uses multiple templates for several businesses running off one central database and set of code. I have created menu items to specific galleries that are then assigned to each template via the page control module and/or by the assign feature in templates. That works great. I also created several rsitem modules, set each to only display on each specific template, and to only display specific galleries that are associated with each specific template.
Where I run into the problem is that when a user clicks on any image in the module on any template, the cookie or template identifier is not passed, while the link automatically assumes the last RSGallery2 menu item Itemid. So what happens, is that the template associated with that Itemid is always shown instead of the template from which the person clicked on the link.
I've looked at the code in the /modules/mod_rsitems.php file and found this:
//get Itemid from menutable
$query = "SELECT id"
. "\n FROM #__menu"
. "\n WHERE published = 1"
. "\n AND link = 'index.php?option=com_rsgallery2'"
. "\n ORDER BY link"
;
$database->setQuery( $query );
$RSG2Itemidobj = $database->loadObjectList();
if (count($RSG2Itemidobj) > 0)
$RSG2Itemid = $RSG2Itemidobj[0]->id;
Is there a way I can grab the current template cookie or Itemid from the page I'm on and pass it with the link.
Lastly, I'm using OpenSEF, so most of my pages aren't physically displaying Itemid in the URL. Will this prevent me from using a $HTTP_GET_VARS to pass the Itemid?
Thanks for your attention and assistance.