Remove the whole usermenu dropdown or remove the a couple of links

Remove the whole usermenu dropdown or remove the a couple of links

by Anthony M -
Number of replies: 8

Hi all, 

Is it possible with custom css to remove the whole usermenu dropdown in RED in the attached picture?

If that is not possible, would it possible to remove the links in GREEN? (This code seems to do it in Fordson theme: https://moodle.org/mod/forum/discuss.php?d=389517#p1580744 but I am in Lambda theme


- Moodle 3.8 

- theme version 1.98.5


I appreciate any help,

Thanks so much!


Attachment Remove links under user menu.png
Average of ratings: -
In reply to Anthony M

Re: Remove the whole usermenu dropdown or remove the a couple of links

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Lamda is a pro theme - they should have support...
In reply to Emma Richardson

Re: Remove the whole usermenu dropdown or remove the a couple of links

by Anthony M -
Thanks for your reply Emma! The licence is in a client name and It would take time to get them to contact the theme support.

I wonder if htere is any moodle setting/capability that would remove the profile link without the need to do it with css?
In reply to Anthony M

Re: Remove the whole usermenu dropdown or remove the a couple of links

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
I don't think so - but you should be able to do it with css - the theme should have a place to put additional css but again, it being a paid theme, only other Lamda users or the vendor would be able to tell you where.
In reply to Anthony M

Re: Remove the whole usermenu dropdown or remove the a couple of links

by Anthony M -
I am using the DevTools panel in Chrome and trying different element names but I can´t find there right path, nothing of the bellow work...

.dropdown-menu.actionmenuaction-1 {
Display: none;
}
---------------
.menu-action-text.actionmenuaction-1 {
Display: none;
}
---------------
usermenu. actionmenuaction-1 {
display: none;
}

If anynow as a clue here I would appreciate ?
In reply to Anthony M

Re: Remove the whole usermenu dropdown or remove the a couple of links

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Use...

.navbar .usermenu a[aria-labelledby="actionmenuaction-1"],
.navbar .usermenu a[aria-labelledby="actionmenuaction-2"] {
display: none;
}
In reply to Jon Bolton

Re: Remove the whole usermenu dropdown or remove the a couple of links

by Anthony M -
Thanks so much Jon, really appreciate tried it but doesn´t seems to work. It´s lamdba theme, is it working for you in a different theme?
In reply to Anthony M

Re: Remove the whole usermenu dropdown or remove the a couple of links

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers
Please note, Lambda is a commercially sold theme and most members of the community will not have access to it. You really need to contact the theme developers themselves.
In reply to Anthony M

Re: Remove the whole usermenu dropdown or remove the a couple of links

by Anthony M -
SOLVED! For those who might need this, the next is the custom ccs code that finally worked to remove the dashboard and profile links...

.usermenu .dropdown-menu-right a[aria-labelledby="actionmenuaction-1"], .usermenu .dropdown-menu-right a[aria-labelledby="actionmenuaction-2"] {
display: none;
}