Coveo for Sitecore v5 is now available!

Creating a Simple Listing Page

The Coveo for Sitecore Hive modularity allows you to create a vast variety of pages. This page could also be put in a widget to be reused through your 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.

You could show the 5 latest articles or expose related content according to the current page title.

Creating a Simple Result List

The step-by-step below assumes that you have:

  • decided upon a strategy as to the web pages that will share the following result list implementation and the location of the results list in those pages.
  • created a .cshtml layout file including a placeholder in which you will insert the necessary Coveo for Sitecore components.
  1. Add the Coveo Search Interface and Coveo Search Resources Coveo renderings as Allowed Controls in the Placeholder Settings.

  2. In the Sitecore Experience Editor, add the Coveo Search Resources component to your page.

  3. Add the Coveo Search Interface component to your page with the Modular Frame.

  4. In the Main Content placeholder, add a Results Section.

  5. In the Results List placeholder, add a Coveo Results List component.

    1. Select or create a new data source for the Result List.
    2. 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.
    3. In the Result Template placeholder, add a new Result Template.
    4. Select or create a new data source for the Result Template.
  6. Save the page.

  7. Go into Preview mode. You should now have a simple list of results.

Adding the Analytics Component

Like in any search interface, if you want analytics, you need to add the Coveo Analytics component.

  1. Click on the UI Header placeholder.
  2. 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 Coveo Search Interface component data source item.

  1. In the Experience Editor, on the Coveo Search Interface component floating toolbar, click the Edit the rendering’s data source option. It should be the leftmost option on the floating toolbar.
  2. In the Query Settings section, set the number of results to display using the Results Per Page field.

If you have the ResultsPerPage component, this setting will have no effect.

Scoping the Query and Boosting Results

There are several mechanisms you may use to filter the items displayed in your results list and promote specific items (see Applying Filtering and Ranking Rules).

Improving the Listing Page

Here are some additional steps you can do to enhance this simple list.

Customizing the Result Template

You can enhance the look of your result list by creating custom, smaller result template tailored to the content you want to show. You can also include multiple template using template conditions to show different results depending on the retrieved content (see Configuring a New Result Template).

Error Report

The error report should always be included. If something goes wrong with the query, this component shows the error details.

When you add a frame component in the Coveo Search Interface component, several placeholders are automatically added in the process. You can insert the Coveo Error Report component inside several of these placeholders. For instance, the Coveo Error Report is set up as an allowed control on the UI Header placeholder.

If you want the component to silently be hidden when failing, do not include the error report.

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.

  1. In the Experience Editor, in the Coveo Search Interface Main Section, add a Search Section.
  2. In the Searchbox placeholder, add a Coveo Searchbox by selecting or creating a new data source for this Searchbox.

Pager

You might want to allow your user to change the page of your result list (see Adding Related Controls).

Tabs

You might want to provide multiple predefined results for your end user. Tabs provide an easy way to switch between many configurations.