Search results widget

Overview

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.
For more information, see Create search indexes.

Configure the widget

To configure a widget, perform the following:

  1. In the page editor, hover over the widget.
  2. Click the toggle menu in the widget label.
  3. Click DotNetCore8 (Edit).

Result list settings

  1. In Number of list items, 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.
    • Show limited number
      This option displays a limited number of search result items. The default number of items is 20 in total. You can change the total number of items displayed.
    • Show all published items at once
      This option displays all published items at once.
  2. Select how to sort the results.
    Select between Most relevant on top, Newest first, and Oldest first.
  3. In Allow users to sort results, select whether you want to display a sort box to enable users to change the default sorting behavior on the frontend.

Display settings

In Display setting section, you can do the following:

  • Change the template
    To change the template that the Search results widget uses, select the new template in the Search results template dropdown box

    You must first have created a custom template.
    For more information, see ASP.NET Core pages and templates.

  • Configure the widget margins
    In Margins, you can choose the margins between the text and the column where it is placed.
    Choose from the predefined values of none, small, medium, or large.

Save your changes.

Advanced widget settings

To open the advanced settings, in the upper-right corner of the Search results page, click DotNetCore11 (Advanced settings).

  • In Label, you can enter a specific name for this widget.
    This name will be displayed in:
    • The page editor as a label for the widget
    • In the treeview with the page structure in the right pane of the page editor.
  • In CSS class, you can enter individual CSS class for the Search results widget.
  • In Search fields, you can enter the fields that the search will search in. 

    NOTE: These fields must be included in the search index that you chose for this search box.
    For more information, see .

    For example, if the search index includes News items, you can choose to search only in the Title.

    If you leave the field empty, all fields are included in the index. 

  • In Highlighted fields, enter the fields where the search terms will be highlighted.

    NOTE: These fields must be included in the search index that you chose for this search box.

    For example, if the index includes News items, and you enter Title filed, the search term that the user enters, will be highlighted only in the titles of the news item, although the search may also return search results from the content.

    If you leave the filed empty, the search terms will be highlighted in all fields.

Labels and messages

In this section, you can configure the labels of the widget.
You can change the following labels:

  • In Search results header, enter the text displayed above the search results.
    For example, enter Results for "{0}"
  • In No results header, enter the text that will be displayed when the search returns no results.
    For example, enter No search results for "{0}"
  • In Results number label, enter the text that will be displayed after the number of results.
    For example, enter results
  • In Languages label, enter the text of the language selector.
    For example, enter Show results in

Save your changes.

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.

Was this article helpful?