Coveo Tab

Implements the Coveo JavaScript Search Framework Tab component. Coveo Tab renderings let you customize your search interface design and behavior. For example, Coveo Tab data source options let you:

You can also control the visibility of your other search interface renderings on a per-tab basis.

Usage Notes

  • You must override the randomly generated DOM Unique Id property value in the data source with a meaningful reference to the tab caption. The DOM Unique Id value serves as the origin level 2 in usage analytics.

  • The Coveo Tab rendering automatically adds the External Content, Query Filter, and Query Ranking renderings.

  • Clicking on a Coveo Tab in a search interface triggers a call to the Search API.

Insertion Location

The Coveo Tab rendering is an Allowed Control in the following placeholder(s): Tabs

Example insertion sequence for the Coveo Tab rendering.

Coveo for Sitecore SXA rendering insertion locations aren’t limited by placeholder Allowed Controls. The Coveo Tab rendering may therefore be inserted throughout the partial design, whether in Coveo for Sitecore or Sitecore placeholders.

You might want to insert all your Coveo Tab renderings in a Sitecore container and set the width of your tabs with the Sitecore grid system to have them displayed side by side.

Example insertion sequence for the Coveo Tab rendering.

Data Source Options

Option name Description
Caption See caption component option.
Enterprise only
Boost expression rules
See Query Ranking rendering data source options.
Enterprise only
Filter expression rules
See Query Filter rendering data source options.
Exclude bucket folders in results See Query Filter rendering data source options.
Exclude media folders in results1 See Query Filter rendering data source options.
Names of external content sources Name(s) of the Coveo organization external source(s) to search through on top of the Coveo source associated with the current Sitecore context database and other external content sources added through the Coveo Search Interface rendering data source.
Pipeline See pipeline component option.
Default layout See layout component option.
DOM Unique Id Serves as the origin level 2 value in usage analytics.
Additional data attributes Allows use of the Coveo JavaScript Search Framework Tab component options that aren't directly available in the data source.

1: By default, the MediaLibraryCrawler only indexes items under /sitecore/media library/Files in the Sitecore content tree.

Sample Generated HTML and Corresponding Visual Output

In the Coveo Tab rendering example below, the Caption was set to Shop, and the DOM Unique Id was set to ShopTab. Filtering and boosting rules were also configured to display only items based off of the ecomitems template and to boost items currently on promotion.

Generated HTML:

<a id="ShopTab" class="CoveoTab coveo-accessible-button coveo-selected coveo-accessible-button-pressed"
data-id="ShopTab" data-caption="Shop" role="button" aria-label="Shop" title="Shop" tabindex="0">
  <p>Shop</p>
</a>
<div class="coveo-tab-component-container">
  <div class="coveo-tab-debug-information coveo-debug-information coveo-debug-hidden">
    <div>
      <!-- Code associated with added External Content sources would appear here -->
    </div>
    <div>
      <div class="CoveoForSitecoreFilterExpression" data-sc-scope-to-tab="ShopTab"
      data-sc-filter-scope-node="{"advanced" : {"type" : "field" , "fieldName" : "_templatename" ,
      "operator" : {"name" : "==" , "value" : 1},"fieldValueType" : {"name" : "string" , "value" : 3},
      "fieldValues" : ["ecomitems"]}}">
      </div>
    </div>
    <div>
      <div class="CoveoForSitecoreRankingExpression" data-sc-scope-to-tab="ShopTab"
      data-sc-ranking-scope-node="{"rankingExpressions" : [{"expression" : {"type" : "field" ,
      "fieldName" : "OnPromotion" , "operator" : {"name" : "==" , "value" : 1},
      "fieldValueType" : {"name" : "string" , "value" : 3},"fieldValues" : ["1"]},"modifier" : 100}],
      "rankingFunctions" : [],"textualRankingExpressions" : []}">
      </div>
    </div>
  </div>
</div>

Search API call aq:

Tab rendering aq value

What's Next for Me?