Create several search menu items - I had 3 which were customised for different areas of the site.
Create a search module for each menu item and publish, but make sure you don't publish on any of the search pages linked to by the menu items. Also make sure to set ItemID in the module so each module points to a different search page.
Each module should go to the search page set by the ItemID in the module.
They always go to the same search page.
J3.3.4
this is because although we have this code in default.php of the mod_search template
<input type="hidden" name="Itemid" value="<?php echo $mitemid; ?>" />
Joomla overrides this with the page Itemid so it is never picked up by com_search
first I changed the code in the mod_search template to
<input type="hidden" name="mitemid" value="<?php echo $mitemid; ?>" />
and then in com_search/controller.php, on I think line 71 instead of:
$post['Itemid'] = $this->input->getInt('Itemid');
I put in:
$post['Itemid'] = $this->input->getInt('mitemid','') ? $this->input->getInt('mitemid') : $this->input->getInt('Itemid');
The result was that if I put an ItemID in the module parameters I get the search page expected. If I don't put an ItemID in or put a wrong one in that is not a search page I get the default search page.
This has been outstanding for quite a while but since the change in J3.3.4 so that getting the menu item by link is not used but rather now by component my old workaround fails.
I can not reproduce the described behavior.
Joomla overrides this with the page Itemid so it is never picked up by com_search
Where exactly is the Itemid overwritten by Joomla! in this process?
This comment was created with the J!Tracker Application at http://issues.joomla.org/.
Category | ⇒ | Front End Search |
OK. mea culpa.
Not an issue with a vanilla install. Problems were caused in my overriding the com_search and mod_search templates
Sorry - please close the issue
This comment was created with the J!Tracker Application at http://issues.joomla.org/.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-09-29 18:07:42 |
Labels |
Added:
?
|
You say this has been outstanding for a while. Please can you link to the report so we can see what was discussed at the time.
This comment was created with the J!Tracker Application at http://issues.joomla.org/.