Best Answer

Remove Add to Calendar on ILT session page

  • 11 August 2023
  • 12 replies
  • 116 views

Userlevel 3
Badge

The add to calendar button doesn’t work for us. I was hiding it in the old player with this CSS:

#doc-layout-action-buttons [aria-label="Calendar"] {display:none;} 

But I can’t seem to figure out how to do the same thing on the new course player. Does anyone know the class/ID that controls this, and what the aria labels are for the new menu? 

I want to hide the calendar as well as mark as outdated.

 

Thank you in advance for your help!

icon

Best answer by Bfarkas 11 November 2023, 19:50

View original

12 replies

Userlevel 7
Badge +3

Hmm. Give this a try, have not tested thoroughly, but seems to be what you are going for:

.dcb-ui-list-item-aside-provided:has([data-icon-name="calendar-note"]) {
display: none;
}

 

Userlevel 7
Badge +3

This one hides ‘add to playlist’

.dcb-ui-list-item-aside-provided:has([data-icon-name="add-playlist"]) {
display: none;
}

 

Userlevel 7
Badge +3

This one hides ‘mark outdated’:

.dcb-ui-list-item-aside-provided:has([data-icon-name="flag"]) {
display: none;
}

 

Userlevel 7
Badge +3

Note, these are based on the icons being used with the idea there won’t be duplicates in the same menu. However, if the icons are changed by Docebo, this will break. I did not use the text being used to allow for translations and flexibility.

Userlevel 3
Badge

Hmm. Give this a try, have not tested thoroughly, but seems to be what you are going for:

.dcb-ui-list-item-aside-provided:has([data-icon-name="calendar-note"]) {
display: none;
}

 

Genius. It worked!

Userlevel 3
Badge

Just kidding. This worked yesterday, but when I logged in this morning it was no longer working. The Calendar icon was back. I’m doing some further testing to try to figure this out, but posting here just in case.

Userlevel 3
Badge

Just kidding. This worked yesterday, but when I logged in this morning it was no longer working. The Calendar icon was back. I’m doing some further testing to try to figure this out, but posting here just in case.

 

I did some testing and the playlist one still works, so it seems somehow the calendar name changed within the last 24 hours.

 

@Bfarkas how do you locate those names so I can take a look and keep testing?

Userlevel 7
Badge +3

Just checked and the name didn’t change and it still works.

Make sure you haven’t truncated anything, or that you don’t have duplicates in your list, or that your list of custom doesn’t have anything broken near it either. Easy way to test is to clear out the whole list, add just that piece back in and it should work as expected.

Hi @Bfarkas I’ll use the opportunity to ask that question here, I would like to hide Add Playlist from this view. Above codes are working on a view within channels. Thank you in advance for any suggestions 🙏🏻.

 

Userlevel 7
Badge +3

Hi @mslezak when you ask for help with things related to course views, can you please specify which course layout you are using, old or new, it makes a vast difference.

@Bfarkas apologies, this is an old course player. Thank you 🤦

 

Userlevel 7
Badge +3

@Bfarkas apologies, this is an old course player. Thank you 🤦

 

In that case the solve Nick provides in this thread should work: 

 

Reply