This page describes how search functionality is delivered on your Styla Frontend. It also tells you how to configure it.
Styla provides a Search module which lets you display search results from both product details as well as other content pages created with Styla Editor. The module uses an external API provided as the source of search results data, so you need a contract with such a partner (at the moment Algolia is supported) that is able to crawl and index an .xml file provided by Styla and then provide search results API.
How this works
Styla automatically provides an .xml file with all content of your Styla Frontend that an external search solution can crawl and index all the links in it.
You create a new config/index in your search solution and set it to use the above .xml file as data source
You configure API credentials so that your Search module can fetch search results from the new index and use render search results. You do this in the FRONT CONFIGURATION tab of Styla Admin. For Algolia, the config looks like this:
"integrations": { "searchEngine": "algolia", "services": { "algolia": { "searchOnlyAPIKey": "", "adminAPIKey": "", "applicationId": "", "index": "" } } }
The
index
field is the name of the index/config you created in your search provider.You create a
/search
page in your Styla Editor and drop the Search module on this page:You include a search input sending your users to the above search results page in your website header custom module. You then drag the module on your Page Base.
The search input in your website header looks like this:
Search results delivered by the module look like this:
Add Comment