This rendering adds external sources from your Coveo organization to the query by altering the advanced query expression (aq) and the 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.
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 source(s) are returned in search results, regardless of the selected search interface tab. When specified in a Coveo Tab data source, items from the specified source(s) are returned in search results when that tab is selected.
Coveo for Sitecore (October 30, 2020) When the Sitecore Instance Filter
Filter results based on the current Sitecore context databaseoption 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.
The External Content rendering is an Allowed Control in the following placeholder(s):
The Coveo for Sitecore SXA External Content rendering is meant to be inserted in specific placeholders (i.e.,
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|
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.
<span class="CoveoForSitecoreExternalContent" data-sc-scope-to-tab="coveod9c70725" data-sc-sources="firstexternalsource,secondextenalsource"> </span>
Search API call