Legacy Search UI Framework
- Inserting and Customizing a Search Interface Component
- Inserting Coveo Search Components to an Existing Item
- Inserting and Customizing a Facet Component
- Inserting and Customizing a Sort Component
- Inserting and Customizing a Tab Component
- Inserting and Customizing a Related Query Component
- Inserting and Customizing a Recommendations Component
- Inserting and Customizing a User Context Component
- Ranking and Filtering Rules
- Inserting and Customizing a Distance Resources Component
- Creating a Search Driven Page
- Duplicating the Coveo Search Component
- Inserting a Coveo Search Box to Your Header
- Autocomplete and Suggestions
- Adding a Field to a Result Template
- Adding Images to Your Search Page
- Customizing a Search Interface
- List of Available Components
- List of Available Parameters
- Relating Coveo for Sitecore Components to Sitecore Templates, Layouts, and Sublayouts
- Digging Into the Layouts and Components Code
- Creating a Custom Component Parameters
- Inserting Custom Component Parameters
- Creating a Search Interface Optimized for Mobile Devices
- Creating a Search Interface Optimized for WebCrawlers
- Understanding How MVC Components Work Behind the Scenes
- Modifying or Removing the Insert Option for the Coveo Search Page
Inserting and Customizing a Sort Component Using the Coveo for Sitecore Legacy Search UI Framework
A sort component allows you to organize search results according to a particular order. The following guide explains how a developer or an administrator can add and set up a basic sort component.
Making a Sitecore Field Sortable
Before inserting any sort component in a search page, you should make sure the Sitecore fields you want to sort on are sortable (See Making a Sitecore Field Sortable).
Once you identified which fields are sortable, you can begin the edition process of the search page.
Inserting and Customizing a Sort Component
- Access the Experience Editor of the Coveo search page you want to edit (see Step 1 in Customizing the Properties of Your Search Interface).
- Locate the
coveo-sorts-MVC) placeholder just above the search interface, on the right hand side, and click it.
- Click Add here to insert a sort component.
- In the Select a Rendering dialog, click the desired sort component and click Select.
- In the Control Properties dialog, specify the following properties depending on the sort component you chose:
- In the Basic Settings section, enter a Title for the sort component. This title will be displayed in the search interface.
Depending on the kind of sort, fill out at least the following additional fields:
Coveo Relevancy Sort Only the Title is mandatory Coveo Date Sort Only the Title is mandatory Coveo Field Sort Sort Field: choose a field on which you wish to base the sorting.
In the Id section:
In Unique Identifier, type in a unique identifier of your choice. This identifier will be used in the website DOM and must therefore only use alphanumerical characters, underscores, and hyphens.
If you do not set a unique identifier yourself, Coveo for Sitecore will generate one for you. You are strongly encouraged to choose your own unique and meaningful identifier.
- Click OK.
- Save and publish your page.
Validate that the component appears in your search interface.
- Validate that search results appear in the correct order.
Refer to Field Sort Component Properties to learn more about the various properties of a Sort component.
You can now proceed to Inserting and Customizing a Facet Range Component.