Vertical Search Experience - Remove Universal Search

Hey Austin,

We’ve been seeing this use case come up more often where we really just need to search for one vertical. I’ve outlined steps below. You can see some examples in action by checking out our new Guides page and Admin Code Snippets page.

1. Set the vertical search as the index page. As you mentioned, it would be great to take advantage of the features only found on Vertical Search. However, you’ll need to have an index.html page for any website because it is the default page when no page is specified (i.e. a user goes to the URL www.domain.com instead of the page www.domain.com/search). As you’ve seen, you’ll run into errors if you don’t have an index.html page.

To remedy this, you can add your vertical page and name it index (i.e. you’ll have a pages > index.html.hbs and a config > index.json file. This allows your vertical search to act as the default page and keep all the functionality of the vertical search, such as facets. You can delete the original index pages that are structured as universal search.

2. Hide the navigation bar. To easily hide the navigation bar, you can comment out the components in your newly created index.html.hbs file. The two lines you need to comment out are:

{{> templates/vertical-grid/script/navigation }}
{{> templates/vertical-grid/markup/navigation }}

Let us know if you have any questions as you implement this!

1 Like