Configuring HawkSearch Box Widget
Goal
This document provides information for configuring the ‘Hawksearch box’ widget.
Prerequisite
Set search results page
- Navigate to a Sitefinity page on which you have placed a ‘Hawksearch box’ widget
- Open the widget designer
- From “Where to display search results“ select a search results page (page with ‘Hawksearch results’ widget)
- Select a Search Index
- Publish the page
Configuring the Search Field
Important
This feature is only available for the Vue SDK
- Navigate to a Sitefinity page on which you have placed a ‘Hawksearch box’ widget
- Open the widget designer
- Go to the Advanced section
- Input the search box configuration settings in the Data field.
{"_searchBoxConfig":{"reloadOnEmpty":false,"redirectOnEmpty":false,"redirectToCurrentPage":false}}
- The configuration fields have the following usage:
- reloadOnEmpty - Refresh the search results with an empty keyword, but keeps all other facet selections. This is available if a results widget is dropped on the same page.
- redirectOnEmpty - Redirects to the results page even if the search field doesn’t have a keyword
- redirectToCurrentPage - If the set redirect page is the current one, forces the page to reload
- Input the search box configuration settings in the Data field.
- Click Save
- Publish the page
Configure the Suggestion Item
Important
This feature is only available for the Vue SDK. It is available when one or more of the configured fields on the dashboard for title and link are missing. Also handles multilingual field support.
- Navigate to a Sitefinity page on which you have placed a ‘Hawksearch box’ widget
- Open the widget designer
- Go to the Advanced section, input the configuration settings in the Data field.
{"_suggestionItem":{"linkField":"link","titleField":"title"}}
- The configuration fields have the following usage:
- titleField - Specifies which autocomplete output field to display as the title
- linkField - Specifies which autocomplete output field should be used for the redirect link
- Go to the Advanced section, input the configuration settings in the Data field.
- Click Save
- Publish the page
Updated about 2 months ago