- Configuring a New Result Template
- Creating a Simple Listing Page
- Inserting and Configuring a Global Search Box
- Inserting and Customizing a Distance Resources Component
- Inserting Custom Components in an Existing Search Interface
- Integrate the Search Interface in an Existing Page
- Translating Fields to the Coveo Format
- Overriding Coveo for Sitecore Hive Initialization Options
- Creating a Custom Hive Component - Multi-Sort Tutorial
Creating a Simple Listing Page
The Coveo for Sitecore Hive modularity allows you to create a vast variety of pages.
You can use a minimal set of components to create a page that only renders results and then improve it with small components according to your requirements.
This page could also be put in a widget to be reused through your pages. For example, you could show the 5 latest articles or expose related content according to the current page title.
You need the Coveo Search Resources included in your page.
Create a Simple Listing Page
In the Sitecore Experience Editor, add the search interface to your page with the Modular Frame.
In the Main Content placeholder, add a Results Section.
In the Results List placeholder, add a Coveo Results List component.
- Select or create a new Data Source for the Result List.
- If you wish to have a card layout instead of a list, edit the properties of the Results List and choose Card in the Results Layout field.
- In the Result Template placeholder, add a new Result Template.
- Select or create a new Data Source for the Result Template.
Save the page.
Go into Preview mode. You should now have a simple list of results.
Adding the Analytics Component
Like any search interface, if you want analytics, you need to add the Coveo Analytics component.
- Click on the UI Header placeholder.
- Add the Coveo Analytics component by selecting or creating a new Data Source.
Changing the Number of Results
The number of results is driven by the Search Interface.
You need to edit the Search Interface properties to change the number of results by using the
Results Per Page field, in the
Query Settings section.
If you have the ResultsPerPage component, this setting will have no effect
Improving the Listing Page
Here are some additional steps you can do to enhance this simple list.
The error report should always be included. If something goes wrong with the query, this component shows the error details.
If you want the component to silently be hidden when failing, do not include the error report.
Scoping the Query
You can scope the query by editing the Search Interface directly. Add your expressions in the Filter Expression Rules field of the Query Filter section.
This allows you to show specific sets of results that respect your expression rules.
Showing Featured Results
You can boost specific results by editing the Search Interface directly. Add your expressions in the Boost Expression Rules field of the Query Ranking section.
This is useful if you want to show specific results to the end user.
Even if it is a listing page, you can decide to include a simple search box. Coupled with the search-as-you-type feature, it can become a powerful side widget.
- In the Main Section, add a Search Section.
- In the Searchbox placeholder, add a
Coveo Searchboxby selecting or creating a new Data Source for this Searchbox.
Your page should now look like this:
You might want to allow your user to change the page of your result list.
You might want to provide multiple predefined results for your end user. Tabs provide an easy way to switch between many configurations.