multiSearch - How to Exclude Records from Search

5 posts by 3 authors in: Forums > CMS Builder
Last Post: March 31, 2015   (RSS)

By Perchpole - March 30, 2015

Hi All -

Is there a way to exclude selected records from a multiSearch? There are often certain pages on my sites which shouldn't be viewed unless the user first comes from another page. The search gives them direct access in a way that should be possible by normal means.

I understand there isn't a "where" function in multiSearch - so I wondered if there was any other way I can make it skip records flagged with a particular value?

Perch

By Jesus - March 30, 2015

Probably with a checkbox field. Something like Searchable record: Yes/No

Where if No selected, then the record could be exclude it.

By Damon - March 30, 2015

Hi,

One way you can exclude records from the multiSearch would be to use the "hidden" checkbox on the record. The record would then not appear in the search results.

To be able to link to the record directly and it have it display (even when marked as hidden) would  require that you add the following to the View Options:

'ignoreHidden'      => true,  // don't hide records with hidden flag set

Hope this helps. If you need any additional details about the steps or have questions, just let me know.

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Perchpole - March 30, 2015

Hi, Damon -

Thanks for your input. Unfortunately the "hidden" option is already factored into this set-up. There are some records which are hidden on the site - which multiSearch will not find. Then there are some records which are visible but which I want to exclude from multiSearch.

For example this could include a "Thank you" page after a user has filled in a form. It's not hidden - I just don't want the search to find it!

:0)

Perch