---
title: Coveo Item Result Template
slug: '3035'
canonical_url: https://docs.coveo.com/en/3035/
collection: coveo-for-sitecore-v5
source_format: adoc
---
# Coveo Item Result Template

> **Legacy feature**
>
> The Coveo Hive Framework is now in maintenance mode and is no longer recommended for new implementations.
>
> To build new search experiences, use one of Coveo's more modern, lightweight, and responsive libraries.
> To get started, see the [Build search](https://docs.coveo.com/en/2473.md) article.

![Coveo for Sitecore Specific Rendering](c4sc-v5/sitecore-20-px-new.png)
Provides a [Coveo JavaScript Search Framework](https://docs.coveo.com/en/187.md) Underscore.js result template for [Coveo Results List](https://docs.coveo.com/en/3036.md) and [Coveo Omnibox Result List](https://docs.coveo.com/en/3070.md) renderings using a field value set on the data source item.

## Usage notes

* The field must contain valid HTML that would usually be included in a `<script>` tag in a usual Coveo JavaScript Search Framework implementation.

* For more result template content details and examples, refer to the [Edit the content of a result template](https://docs.coveo.com/en/2834.md) article.

* Typical search interface result sections contain several result template renderings (whether **Coveo Item Result Template** renderings, **Coveo File Result Template** renderings, or a combination of both) with conditions that determine the template a result item will use.
The order of your result template renderings in the `Result Templates` placeholder is important (see [Result template conditions](https://docs.coveo.com/en/2173.md#result-template-conditions)).

## Insertion location

+
<div>
<h3>Coveo Hive</h3>
  
The **Coveo Item Result Template** rendering is an Allowed Control in the following placeholder(s): `Result Templates`

  <video width="690" height="335" controls="">
  <source src="https://docs.coveo.com/en/assets/images/c4sc-v5/item-result-template.mp4" type="video/mp4" />
  Your browser doesn't support the video tag.
</video>
  <div class="figure-caption">Example insertion sequence for the **Coveo Item Result Template** rendering.
  </div>
</div>
<div>
<h3>Coveo Hive SXA</h3>
  
When you add the Coveo Results List SXA rendering, this adds a `coveouiresulttemplatessxa` placeholder. Insert your Coveo Item Result Template renderings in this `coveouiresulttemplatessxa` placeholder.

  <video width="690" height="335" controls="">
  <source src="https://docs.coveo.com/en/assets/images/c4sc-v5/item-result-template-sxa.mp4" type="video/mp4" />
  Your browser doesn't support the video tag.
</video>
  <div class="figure-caption">Example insertion sequence for the **Coveo Item Result Template** rendering.
  </div>
</div>
+

## Data source options

The following table lists the available data source options for this rendering.

| Option name | Description |
|---|---|
| Script | The HTML of the result template (see [Coveo Item Result Template](https://docs.coveo.com/en/2173.md#coveo-item-result-template)). |
| Display in mobile mode | Defines whether to show the template when the user is in mobile mode. |
| Display in tablet mode | Defines whether to show the template when the user is in tablet mode. |
| Display in desktop mode | Defines whether to show the template when the user is in desktop mode. |
| Result layout | Defines whether the template should only be used only in a `Card` layout, only in a `List` layout, or in both. |
| Template based conditions | Specifies the Sitecore templates that will use this result template. |
| Field value based conditions | Specifies Coveo field name and value conditions a search result must meet, in addition to the template-based conditions, for this result template to be used. |
| DOM unique ID | {empty} -- Randomly generated HTML element ID. -- |

## Sample generated HTML and corresponding visual output

Consider a situation where you create separate result templates for each of your Sitecore templates.
Using a `Template based condition` in one of your **Coveo Item Result Template** rendering data sources, the rendering would generate outputs similar to the following.

```xml
<script id="coveo5e882470" class="result-template" type="text/x-underscore-template"
data-prebind-sc-all-conditions="unfoldDictionaryToAttributesPrebind"
data-sc-all-conditions="{&quot;_template&quot; : &quot;311337FF57ED447B86B18BDFA5DBDC82&quot;}"
data-applied-prebind="true" data-field-z95xtemplate="311337FF57ED447B86B18BDFA5DBDC82">
<!-- beginning of the content entered in the Script field of the data source -->
  <div style="padding: 5px; background-color:powderblue;">
    <div class="my-result-template-header" style="display: flex; align-items: center;">
      <div class="CoveoIcon" data-small="true"></div>
      <div class="CoveoResultLink" data-field="{{= coveoFieldName("@title") }}"
        style="flex-grow: 1; margin-left: 5px;"></div>
    </div>
    <div class="my-result-template-content">
      <div class="CoveoExcerpt"></div>
    </div>
  </div>
<!-- end of the content entered in the Script field of the data source -->
</script>
```

![Result templates Versus Conditions | Coveo for Sitecore 5](https://docs.coveo.com/en/assets/images/c4sc-v5/item-result-template-example-vis.png)