Create a widget

The following procedures describe how to create widgets in Sitecore Search. New widgets have a Default variation that you can name when you create the widget. New widget variations do not have any rules.

In a multi-entity implementation, by default, widget variation rules are configured to apply when searching all entities. You can change the rule to apply to a single entity.

Note

If you want a widget to appear on a specific page, you must add it to that page before your developer can add it to your application.

Search results widget

Use a search results widget to display full-page search results after a visitor has entered a keyphrase in the search box and run the search.

A search results widget is configured for you when your domain is created. However, if you need to create any additional search results widgets, you can use the following process to do so.

To create a search results widget:

  1. On the menu bar, click Widgets.

  2. On the Widgets tab, click Add widget.

  3. Click Search results.

  4. Enter or select values for the Widget name, RFK ID, Variation name, and Will be used in form fields, and then click Next.

    Setup widget screen with widget name, RFK ID, variation name, and will be used in fields.
  5. Review your choices. Then, to complete creating the widget, click Save.

  6. To deploy your new widget, click Publish.

Preview search widget

Use a preview search widget to create a pop-up search experience that gives visitors suggested content based on their search. This can include auto-completed and auto-corrected suggestions.

When your domain is created, a single preview search widget that is common across all pages is configured. However, if you want to use different analyzers to provide different types of suggestions on different pages, you can create your own preview search widgets and add them to specific pages.

To create a preview search widget:

  1. On the menu bar, click Widgets.

  2. On the Widgets tab, click Add widget.

  3. Click Preview search.

  4. Enter or select values for the Widget name, RFK ID, Variation name, and Will be used in form fields. Then, click Next.

    Setup widget screen with widget name, RFK ID, variation name, and will be used in fields.
  5. Review your choices. Then, to complete creating the widget, click Save.

  6. To deploy your new widget, click Publish.

Recommendation widget

Use a recommendation widget to display customized recommended content to visitors.

The most important part of the recommendation widget is the recipe, which determines the type of recommendations given.

For example, recommendation widgets can display content that is:

  • Popular among visitors to your site.

  • Recently viewed by the visitor.

  • Similar to the content on the current page.

To create a recommendation widget:

  1. On the menu bar, click Widgets.

  2. On the Widgets tab, click Add widget > Recommendation.

  3. On the Setup Widget screen, enter or select values for the Widget name, RFK ID, Variation name, and Will be used in fields, and then click Next.

    Setup widget screen with Widget name, RFK ID, Variation name, and Will be used in fields.
  4. To select a recipe to use with this widget, on the Choose Recipes screen, from the Entities drop-down menu, select an entity or All.

  5. On the desired recipe card, click Choose.

    Important

    When selecting a recipe, make sure it is valid for the entity you intend to use it with. All entities supported by a particular recipe have a green checkmark next to them on the recipe card.

    To help you choose a recipe, you can filter recipes by:

    • Name - enter text in the Search input field.

    • Creator - select Domain or Sitecore in the drop-down menu.

  6. To change a selected recipe, click Choose another or, to select another recipe for a different entity or entities, at the bottom of the screen, click Add.

  7. For each recipe added, to change the entity or entities you want to use that recipe for, select the check box beside the entity name.

    Tip

    An entity must have one recipe assigned for the widget to display recommendations for that entity.

  8. When you have assigned all desired recipes, click Next.

  9. Review your choices. To complete creating the widget, click Save. Then, to deploy your new widget, click Publish.

Do you have some feedback for us?

If you have suggestions for improving this article,