Custom Omnibox disable selection
I am attempting to implement a custom Omnibox component in my Sitecore implementation. Is there a way to override the events that are fired when a user selects an item from the Omnibox. We need to customize the url that is set when selecting an item and we need to prevent the default behavior from occuring. We are following the steps in this article https://developers.coveo.com/display/public/JsSearchV1/Adding+a+Standalone+Search+Box
Thanks in advance, Nick
First, I would suggest o use our existing component in Sitecore. See: https://developers.coveo.com/display/SitecoreV4/Inserting+a+Coveo+Search+Box+to+Your+Header
The component is using the CoveoSearchBox.acsx sublayout (or SearchBoxView.cshtm for MVC). Duplicate the file and the component before customizing it, just like you would do for the standard search: https://developers.coveo.com/display/SitecoreV4/Duplicating+the+Coveo+Search+Component
Now, you can then start providing different type of suggestions, and the behavior will be different for each of them:
- Query suggestions : Will redirect to the search page with the selected query
- Facet suggestion : Will redirect to the search page with the selected facet
- Result suggestions : Will redirect to the selected result
For more info on how to implement each of them for both the search box and search interface: https://developers.coveo.com/display/SitecoreV4/Providing+Suggestions+using+the+Coveo+Omnibox
And here is the advanced topic on how to create your own Omnibox Suggestion Provider: https://developers.coveo.com/display/JsSearchV1/Providing+Suggestions+for+the+Omnibox#
Let me know which component you want to use and what exactly you want to customize and I will do my best to help you.
Which type of suggestion component do you wish to modify ?
Currently it's possible to provide suggestions with either : Facets, Result list, Coveo analytics service, Coveo Machine Learning service etc.
Also, could you provide me the version of the UI library you are using ? This will help to know if it's a very old version or newer !
You can check this by typing Coveo.version in the browser console.