Gravatar for jennifer.palawasta@blackbaud.com

Question by Jennifer Palawasta, Jun 8, 2016 3:20 PM

Remove coveo-count value from facet box

Our customers are confused by the numbers next to out facets so we are trying to remove them. I found that the numbers are being called from the coveo-count defined in the js file, but I can't seem to figure out how to hide the value from our search pages. Any advice would be appreciated.

Thanks.

1 Reply
Gravatar for olamothe@coveo.com

Answer by olamothe, Jun 8, 2016 3:30 PM

You can simply use css for this :

.coveo-facet-value-count {
    display: none;
}

Add this to your search page, either directly in a style tag or in an external stylesheet (do not override the original css file, or you will have problems when upgrading)

Gravatar for jennifer.palawasta@blackbaud.com

Comment by Jennifer Palawasta, Jun 9, 2016 9:57 AM

Thanks for your response. I tried the code in the CSS and search page (not at the same time) and the facet count still displayed. I checked the css and search page files to make sure there was not an existing reference for the element and did not find one. Any suggestions?

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 9, 2016 1:28 PM

Hi,

If you added this rule before the default Coveo JavaScript Search Framework stylesheet, your rule was overridden by the later.

You need to add this rule after the default Coveo JavaScript Search Framework default stylesheet or modify the rule to give it more weight than the default rules. This can be achieved like this for example:

body .coveo-facet-value-count {
    display: none;
}
Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Jun 9, 2016 1:30 PM

Also, if you use the Coveo JavaScript Search Framework 0.9, the name of the CSS class to override is .CoveoFacet .coveo-value .coveo-count instead of .coveo-facet-value-count.

Gravatar for jennifer.palawasta@blackbaud.com

Comment by Jennifer Palawasta, Jun 10, 2016 7:55 AM

That was it! We are on the .9 framework. Thanks for your help.

Ask a question