Display results for an empty search input field
Sitecore Discover displays results in the preview search widget, based on the text entered in the search input field. This procedure describes how you can generate recommendations even when the visitor clicks Search without entering any text.
To display results for an empty search input field:
-
In an empty file, add some keywords separated by commas and save the file as keywords.csv.
-
In the Customer Engagement Console (CEC), on the menu bar, click Widgets.
-
On the Widgets tab, click the name of the preview search widget you want to open.
-
On the Widget Variations tab, click Add Variation and in the input field, enter an easy to identify name for the new variation.
-
Turn on the Make this as a default variation switch and click Save.
-
On the Rules tab, click Add Rule.
-
On the menu bar, click Context and click the Site Context tab.
-
Click Add Attribute, select Keywords from the list, and in the operator drop-down menu, click Is Empty.
-
To add keywords from the keywords.csv file, click Import value from file.
-
Locate the keywords.csv file and click Open.
-
Click Save and then click Publish.