Gravatar for

Question by Ben, May 22, 2015 9:21 AM

Coveo for Sitecore Standalone Search on a Search Page

The only example I can find for implementing a standalone search on a search page is here. The CoveoForSitecore.componentsOptions do not include an attribute for externalComponents. How should I implement this?

2 Replies
Gravatar for

Answer by Jean-François L'Heureux, May 22, 2015 9:33 AM

In Coveo for Sitecore, even if CoveoForSitecore.componentsOptions.externalComponents is undefined by default, you can instantiate it and add your components to it. We use the Javascript Search Framework for the UI so anything you can do in this framework, you can also do it in Coveo for Sitecore.

if (!CoveoForSitecore.componentsOptions.externalComponents) {
    CoveoForSitecore.componentsOptions.externalComponents = [];
Gravatar for

Comment by Ben, May 22, 2015 9:47 AM

Your answers always lead me down the right path. My problem was, I wasn't wrapping my $('#coveosearchbox').coveo('noConflict'); statement into the if (!isOnSearchPage()) {} condition. Thanks for your help.

Gravatar for

Answer by Simon, May 22, 2015 9:28 AM

For Coveo for Sitecore, we have a dedicated component:

Hope it helps,

Ask a question