Hello,
I have an entity list which has 3 views in the view selector. I would like to hide views based on the user's web roles with javascript. I am able to capture the web roles from a liquid tag, but cannot figure out how to hide an individual view. The sample code i get with Copilot is:
That worked perfectly as is. Thanks so much!
The bit that does the hiding in your code is not correct. The following can probably be refined a bit, AND you will also have to handle the case where the view is the currently selected view also.
Not using the variable at all, something similar to
$("#filterDropdownId ul.dropdown-menu li a[aria-label='Portal Teachers - System-Wide']").parent().hide();
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43