Skip to main content
Answer

Is it possible to remove the option to filter courses by Code A-Z and Code Z-A?

  • February 18, 2022
  • 3 replies
  • 144 views

Forum|alt.badge.img

I’d like for users to only be able to sort courses by Newest-Oldest, Oldest-Newest, Name A-Z, Name Z-A. Is that possible? That would mean removing or hiding the option to sort by Code A-Z and Code Z-A in the course catalog. 

Best answer by alekwo

@JMouatt technically you can hide those options using CSS.

One caveat is that this code may be not unique to the catalog page, and may be hiding something else on other pages that would fit the same CSS selector, so you will need to test it and may need to work no a more specific selector.

Also, it assumes that sorting by codes will always be the 3rd and 4th option in the drop-down, so it will require changes should Docebo ever change the order of options in the menu.

doc-widget-course-catalog > ui-data-browser > div> div > div > div > ui-button-dropdown > div > div > ui-button-dropdown-option:nth-child(3),
doc-widget-course-catalog > ui-data-browser > div> div > div > div > ui-button-dropdown > div > div > ui-button-dropdown-option:nth-child(4)
{
display: none !important;
}

before:

after:

 

3 replies

alekwo
Guide III
Forum|alt.badge.img+1
  • Guide III
  • Answer
  • February 18, 2022

@JMouatt technically you can hide those options using CSS.

One caveat is that this code may be not unique to the catalog page, and may be hiding something else on other pages that would fit the same CSS selector, so you will need to test it and may need to work no a more specific selector.

Also, it assumes that sorting by codes will always be the 3rd and 4th option in the drop-down, so it will require changes should Docebo ever change the order of options in the menu.

doc-widget-course-catalog > ui-data-browser > div> div > div > div > ui-button-dropdown > div > div > ui-button-dropdown-option:nth-child(3),
doc-widget-course-catalog > ui-data-browser > div> div > div > div > ui-button-dropdown > div > div > ui-button-dropdown-option:nth-child(4)
{
display: none !important;
}

before:

after:

 


Forum|alt.badge.img
  • Author
  • Contributor I
  • February 21, 2022

Thank you @alekwo that worked for the course catalog. If I want the same thing in the ‘my courses and learning plans’ do I repeat the same code but replace the doc-widget-course-catalog with doc-widget-my-courses-and-learning-plans?

 


Forum|alt.badge.img
  • Author
  • Contributor I
  • February 21, 2022

Would you also happen to know if we can use CSS to remove the score part of assignments? :)