Catalog's Search Form - how does it work?

Jump to solution
greg_lawrence
Community Novice

I am trying to find some documentation on how Catalog's search form works but can't find much online. From using it in our instance, it appears it works by searching for Listings in the immediate Catalog not the sub-catalogs beneath it. Is that how it works?

If that is the case, then it's not that useful when a lot of your main catalog pages contain no course listings. Just wondering if any other Catalog users have encountered this issue and how have you managed it? 

Was thinking about:

  • Adding some code to make the search engine results show on a separate browser window than on our main catalog page - which is set up not to show any listings; and
  • Setting up another search engine that searches the whole Catalog.

Keen to hear your thoughts on this.

Cheers

Greg 

1 Solution

No worries Jessica

What I did:

On the main catalog (home) page I inherited categories from the sub-catalogs ancestry and created categories for all the sub-catalogs. Doing both those things in Catalog  (not sure if the order really matters) made all Catalog course listings display on our Catalog homepage.

As we have our own Catalog tiles on the homepage, we do not want to display any listing there. But we do want the Catalog homepage search engine (form) to be able to search all of our course listings and for the results to be displayed on a separate page that is not the Catalog homepage.

Do do this, I used the jquery hide function to hide course listings.

$('#listings').hide();

 

I then created an additional click event that is triggered at the same time someone submits a new search query that reloads the browser's window. The timing of this click event has a slight delay on it so the search query results are returned first before the page reloads. Doing this allows for the search query results to load onto a new webpage. 

$( "#search-submit" ).click(function() {
setTimeout("location.reload();", 1000);
});

Hope this makes sense and I suspect I am not the first to work this out. 

Cheers

Greg 

View solution in original post

0 Likes