External Content

Coveo for Sitecore Specific Rendering This rendering adds external sources from your Coveo organization to the query by altering the advanced query expression (aq) and constant query expression (cq) of search API calls (see About the Query Expression).

It registers a handler in the onBuildingSitecoreExternalContent event triggered by the CoveoForSitecoreExpressions component.

Usage Notes

  • The External Content rendering is added automatically with the Coveo Search Interface and Coveo Tab renderings.

  • When external content sources are specified in a Coveo Search Interface data source, items from the specified sources are returned in search results, regardless of the selected search interface tab. When specified in a Coveo Tab data source, items from the specified sources are returned in search results when that tab is selected.

  • When the Sitecore Instance Filter Filter results based on the current Sitecore context database option is disabled, items from all your Coveo organization sources are included in search results, unless you explicitly specify target sources in the External Content rendering.

Insertion Location

Coveo Hive

The External Content rendering is an Allowed Control in the following placeholder(s): UI Header, Recommendations Components, Searchbox Components

Example insertion sequence for the External Content rendering.

Coveo Hive SXA

The Coveo for Sitecore SXA External Content rendering is meant to be inserted in specific placeholders (i.e., UI Header, Recommendations Components, Searchbox Components).

Example insertion sequence for the External Content rendering.

Data Source Options

Option name Description

Names of external content sources

The names of the Coveo organization external sources to search through on top of the Coveo source associated with the current Sitecore context database. For multiple external sources, use a comma between your source names or list the sources on separate lines.

Sample Generated HTML and Corresponding Query Expressions

In the example below, two external sources were added in the Names of external content sources field of a Coveo Tab rendering data source.

Generated HTML:

<span class="CoveoForSitecoreExternalContent" data-sc-scope-to-tab="coveod9c70725"
data-sc-sources="firstexternalsource,secondextenalsource">
</span>

Search API call aq and cq:

External content aq cq