Monday, 30 April 2018
  3 Replies
  8.5K Visits
0
Votes
Undo
  Subscribe
Hello,

In Filter Module we have the option "Target Menu Item". This is usefull when the search/filter form is used on a page that isn't a featured articles or category blog page.

But we need to be set this "Target Menu Item" also in pages that are featured articles or category blog page.

We have a category with several subcategories:
Category Trainning:
subcategory Courses
subcategory Masters

When the user is in a subctegory, we need that he can search in the hole category (not only in the subcategories)
Accepted Answer
You mean - so you can force the filter module to use a specific menu item in all cases?

I can add this as a config option for the next release - in the meantime you can change the code as follows. Edit the file modules/mod_easylayoutfilter/tmpl/default.php and change lines 32-28 from

if (JFactory::getApplication()->input->get("option")!="com_content"
|| !(JFactory::getApplication()->input->get("view")=="featured" ||
(JFactory::getApplication()->input->get("view")=="category" && JFactory::getApplication()->input->get("layout")=="blog"))
)
{
$action = JRoute::_("index.php?Itemid=" . $Itemid);
}


to

$action = JRoute::_("index.php?Itemid=" . $Itemid);

Review EasyLayouts. If you use EasyLayouts please post a rating and a review at the Joomla! Extensions Directory.
https://extensions.joomla.org/extension/easylayouts/

Accepted Answer
You mean - so you can force the filter module to use a specific menu item in all cases?

I can add this as a config option for the next release - in the meantime you can change the code as follows. Edit the file modules/mod_easylayoutfilter/tmpl/default.php and change lines 32-28 from

if (JFactory::getApplication()->input->get("option")!="com_content"
|| !(JFactory::getApplication()->input->get("view")=="featured" ||
(JFactory::getApplication()->input->get("view")=="category" && JFactory::getApplication()->input->get("layout")=="blog"))
)
{
$action = JRoute::_("index.php?Itemid=" . $Itemid);
}


to

$action = JRoute::_("index.php?Itemid=" . $Itemid);

Review EasyLayouts. If you use EasyLayouts please post a rating and a review at the Joomla! Extensions Directory.
https://extensions.joomla.org/extension/easylayouts/

6 years ago
·
#906
You mean - so you can force the filter module to use a specific menu item in all cases?


Exactly. This way we can put the "search(filter) module" in any page of the web.

I will try your code and tell feedback

Thanks for your time.

PD: do you know you have the most complete Search Module of Joomla at this time? :p
I have not found another one who can search in article content and custom fields (not like the joomline JL Content Fields Filter one) and the display is in the same joomla Blog Layout (not like the Joomlart filter).
6 years ago
·
#908
Tested. works fine.

Now, we can display the Search/Filter Module in any page of the web, not only in the category where the search is going to take place.

THANK YOU
  • Page :
  • 1
There are no replies made for this post yet.