Customizing Result Templates

Result templates can be customized to display all the information you want for your results in your search interface.

To customize your result templates, you are encouraged to use result template components.

To learn how to customize result templates using the Interface Editor, see Configuring JavaScript Search Result Templates.

Using Result Template Components

Result template components are specifically designed to be used inside result templates.

To insert them, inside your result template, simply add a div element with the Coveo<Component> class, where <Component> is the name of the component you want to insert. You then need to add all other required or desired options to this element in the data-option format.

You want to add the Quickview component to your result template.

Inside the script element of your result template, add the following line:

<div class="CoveoQuickview"></div>

The generated reference documentation for all publicly exposed components is available on GitHub (see Coveo JavaScript Search Framework - Reference Documentation).

Result Template Component List

The Coveo JavaScript Search Framework offers the following result template components:

Common Use Cases

The following articles present common use cases when customizing result templates.