Question

CSS needed to remove Active Filer options

  • 15 November 2023
  • 5 replies
  • 56 views

Userlevel 1
Badge

Hi all, 

 

In our catalog pages, we have multiple Active Filers we will never use: Price (all our courses are free), Language (all in English) and Duration (this is irrelevant to our content). When a learner is trying to find a course, having these options make it a bad experience since each will return 0 results. It makes it seem like there is an issue, when they are simply filters we don’t use. 

 

Does anyone have some CSS that will hide these options? I tried to make my own, but I clearly have no idea how to code. 🤦🏻🤷🏻

 


5 replies

Userlevel 6
Badge +3

@Bfarkas ???

Userlevel 4
Badge +1

I think this should do it:

doc-widget-course-catalog .dcb-ui-accordion-panel:nth-child(3), doc-widget-course-catalog .dcb-ui-accordion-panel:nth-child(4), doc-widget-course-catalog .dcb-ui-accordion-panel:nth-child(5) {
display: none
}

 

Userlevel 7
Badge +3

I do not see a better route here, falls under the category of it would be great if more unique id’s were leveraged in page components.

That being said…..please be careful with this as it is VERY situational specific and when it breaks it breaks in a  dangerous way.

Generally, CSS changes are not that big of a deal because when they break things just look weird, or are showing when you tried to hide them, but the functions still work. When using a selection by child count, what can happen is Docebo makes  a change to the order, adds an item, removes an item, shuffles, really anything, and instead of just showing things again, you will actually hide the wrong things. Just be aware of the maintenance implications on something like this.

Userlevel 4
Badge +1

💯 – I should have added that disclaimer myself. Thanks for covering for me, @Bfarkas! How did the community coaching session go, by the way?

Userlevel 7
Badge +3

Hi @Mdubey 

I just checked our catalog filters and we don’t have the price filter. I think this might be because we don’t have the E-Commerce app activated. Do you have that app activated?

 

Reply