THIS IS ARCHIVED DOCUMENTATION

CoveoForSitecoreContext

The CoveoForSitecoreContext component holds all the properties required to resolve the current context and serves for debugging purposes. It’s automatically added to the page when you insert the Coveo Search Resources component.

Properties

Attribute name Description Example value Notes
scItemUri The item ID used to resolve the current database 11111111-1111-1111-1111-111111111111
scLanguageFieldName The field name used to resolve the language of an item fz95xlanguage5059 The field should be translated. You should apply prebinding if your field isn't already translated (see Coveo Fields Resources Component).
scLatestVersionFieldName The field name used to resolve the latest version of an item fz95xlatestversion5059 The field should be translated. You should apply prebinding if your field isn't already translated (see Coveo Fields Resources Component).
scCurrentLanguage The current context language en
scRestEndpointUri The rest endpoint on which the request is sent to Coveo /coveo/rest
scLabels The dictionary used to translate labels from English to the current language

Uses the values under the following path: /sitecore/system/Dictionary/Coveo Hive .

Falls back to English if not found.

scPageName The current page name My Search Page
scDefaultPipelineName The default pipeline name mypipeline Optional.
scAnalyticsEnabled Defines whether the analytics are enabled true/false Should be disabled when you don't want to send analytics requests, such as in the Experience Editor.
scIsUserAnonymous Defines whether the user is anonymous true/false
scFieldPrefix The prefix to put in front of the translated fields f
scFieldSuffix The suffix to put at the end of translated fields 5059 This should be the hash computed to target a specific index.
scExternalFields Array containing external fields definitions.

[{"fieldName":"sysauthor","shouldEscape":false},

... ,

{"fieldName":"mycustomexternalfield","shouldEscape":false}]

This is used by the field translator to determine whether to escape the field or not.
scIndexSourceName The current resolved source name Coveo_master_index - My_Sitecore_Instance

Events

onSitecoreContextInitialization

Event triggered when the context gets initialized.

Register a handler to this event to initialize values using the context.