Gravatar for

Question by fmarkovic, Dec 7, 2016 9:43 AM

Changing facet UI for sitecore


We are trying to change the view of facets. Since elements that are child of div with class="CoveoFacet" are created in CoveoJsSearch.WithDependencies.min.js, what is the best way of creating custom elements instead of default ones, and have as little as possible problems next time we update coveo?

Thank you!

1 Reply
Gravatar for

Answer by Jean-François L'Heureux, Dec 7, 2016 9:57 AM


There is no way to customize the Coveo JavaScript Search Framework facet component generated HTML markup. The recommended way to customize facets is with CSS. You can hide some of the facet child elements with display:none; for example or change the icons with background-image.

To customize more than that, you need to duplicate the Coveo JavaScript Search Framework facet component JavaScript code, name it differently, and do your modifications in your own copy of the component. Then in Sitecore, create a new sublayout/view to use your own component.

This guide explains how to create a custom Coveo JavaScript Search Framework component.

I hope this helps


Ask a question