Smart Search Filter Not Working In Helix Ultimate Search Box - Question | JoomShaper

Smart Search Filter Not Working In Helix Ultimate Search Box

A

agv_joomshaper

Helix Framework 8 months ago

We have enabled the search box in the Helix menu. In the smart search component we have defined a filter so that only articles and pages are searched. How can we link this filter to the search box in the helix menu so that only the results from articles and pages are shown? The filter is not picked up automatically.

Best regards Phons Stokkermans.

0
9 Answers
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 8 months ago #128279

Hi

Thanks for contacting us. You can follow Pavel's instructions. Thanks Pavel for sharing the solution.

-Regards.

0
Pavel
Pavel
Accepted Answer
8 months ago #128128

Hi.

You have two options:

  1. More simple. You should turn OFF pedefined Header (in Basic tab), сreate custom Header (in Layout tab) and publish there finder module with your filter. Additional CSS coding will be required to put the appearance in order.
  2. More complex. You can create custom Header via making a copy of one of existing pedefined Headers, and make changes in its PHP code to call finder module (or module position) with your filter. Additional CSS coding will be required too
0
A
agv_joomshaper
Accepted Answer
8 months ago #128143

That is too complex for me!

Another option is to add a menu-item 'Search' with the filter applied and disable the search box. For me is this the second best option. I like the search box.

Is it possible to make a request for change so that adding a filter on the search box is an option. (When you turn on the 'enable search' option in the header section in the basic tab, you can hookup a filter). What I want is to use the search box with a filter and without custom css or javascript.

0
Pavel
Pavel
Accepted Answer
8 months ago #128253

Is it possible to make a request for change so that adding a filter on the search box is an option.

Hi. I am not an employee of support. You can do this. But I have many years of experience on this forum. I have repeatedly watched the fate of the requests of functions from users. That's why I believe you will learn CSS faster and you can use the first option than it will happen in Helix :).

For a user with skills, this will take 10 minutes. If there is no skills, but you will set a goal to solve the problem, then I think in a couple of days you will be successful.

0
Pavel
Pavel
Accepted Answer
8 months ago #128276

It turned out to be a free minute.

Here is example using option 2:

  1. Create new folder with unique name inside headers folder (in my case it is style-3 folder).
  2. Copy files from existing folder to the new folder (in my case I copied files from style-1 to style-3).
  3. Open header.php from style-3 folder and edit it by replacing from this line...
    php echo ModuleHelper::renderModule($searchModule, ['style' => 'sp_xhtml']);

    ...to that(this creates the module position with search-header name instead of the default search module).

    jdoc:include type="modules" name="search-header" style="none"

(You should add open/close corner brackets like in a screenshot since I can't add the code with them to the post.) And save.

After these actions, you will receive your new Header style. Choose it in the settings.

  1. Create new search module with filter you want and publish it in search-header position, just by typing position name and press Enter.

You will get it.

  1. And all that remains is to hide the label through CSS.
    label.finder {
     display: none;
    }
0
A
agv_joomshaper
Accepted Answer
8 months ago #128793

Hi there,

In step4 I don't see the option 'header position'. I only see the option Search [search] option. If I select the Search option for the position the search box is not displayed.

How do I solve this issue?

Best regards Phons.

0
A
agv_joomshaper
Accepted Answer
8 months ago #128792

Hi there,

In step4 I don't see the option 'header position'. I only see the option Search [search] option. If I select the Search option for the position the search box is not displayed.

How do I solve this issue?

Best regards Phons.

0
Pavel
Pavel
Accepted Answer
8 months ago #128797

Hi. Just typing position name and press Enter.

Do not look for it in the dropdown list, namely write it. Thus, you create a new position in Joomla, which did not exist before. After at least one module is published in this position, it will become available in the dropdown list (in user positions section).

0
A
agv_joomshaper
Accepted Answer
8 months ago #128838

Thanks! After some custom css changes everything is fine.

0