Search results widget

You use the Search results widget to configure where and how to display the results of a search that a user performed on your website.

PREREQUISITES: You created at least one search index and added the Search box widget somewhere on your website.

Configure the Search results widget

  1. Drag and drop the Search results widget on a page of your choice.
  2. In the upper-right corner of the widget, click the Edit button to open the widget designer.
  3. Select one of the following options:
    • Use paging
      This option divides the search results list in several pages. Each page contains up to 20 items. You can change the number of items per page.
    • Use limit
      This option shows only a limited number of search result items. The default number of items is 20 items in total. You can change the total number of items displayed.
    • No limit and paging
      This option shows all published items at once.
  4. From the Sort results dropdown menu, select the option you want to use.
    By default, the most relevant results are listed on top of the list. You can change this default sorting behavior to Newest first or Oldest first.
  5. To enable users to change the default sorting behavior on the frontend, select the Allow users to sort results checkbox.
  6. Under Template, select the template you want to use to display the search results on the page.
    The Templates dropdown menu lists all Search results widget templates created from Sitefinity CMS backend and all Search results views created in the file system.

    NOTE: You can optionally customize the default widget template or create a new template for the Search results widget. For more information, see Overview: Widget templates.

  7. To apply styling to Search results widget, expand the More options and set Style and CSS classes. CSS classes are applied to the div element containing Search results widget.
    In case you created predefined styles, you can see the Style dropdown menu listing all your predefined styles. For more information about predefined styles, see Add predefined styles.
  8. If you are using a search index that has indexed custom fields or the fields of any dynamic content type, perform the following:
    1. Click Advanced and then click Model.
    2. Enter these fields in SearchFields input field, separated by semicolon (;).
    3. If you want the search phrase to be highlighted in these fields, enter them also in HighlightedFields input field.
    4. Click Save.
  9. When you are finished, click Save.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Tags

Was this article helpful?