[ARCHIVED] CSS to hide Help menu item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does anyone have some CSS that would hide the "Help" options in the Canvas main nav menu? We have Canvas 24/7 support links and phone numbers, so any course we make public will automatically broadcast that info to search engines.
I'd like to modify the theme of a sub-account so that the Help link disappears, and then use that sub-account for Public courses. Better yet would be some way to modify the help menu in Themes, but Canvas doesn't allow for that.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "Help" link is on the global navigation menu. It resides outside of any course or sub-account that contains a course. If someone goes to your institution, they will have access to the help menu. It is important that the students have access to that menu, so you really don't want to go hiding it -- unless you can know that they are inside a public course.
Available in the window.ENV variable are some values that would allow you to know if the person was logged in. If they were not logged in, then you could modify things, but that would require JavaScript and not just CSS. There's nothing that I know of in the page itself that would allow you to know if they were logged in or not, so a CSS solution isn't available.
Even hiding the Help item from every needs JavaScript to accomplish. The CSS selector to make sure you get the help menu is not on the item you want to hide, you want to hide it's parent. If the Help is the last thing in the menu (it probably is), then you could use
#menu li:last-child {display:none;}
However, there might be an easier and definitely better way.
While you cannot control the help menu based off which sub-account you're in, you can control the help menu based off of who is looking at it. For example, "Ask Your Instructor a Question" doesn't show to people who aren't students.
To control who sees what items, click on the pencil to edit a link.
There you will find an "Available to" section. This is what it looks like for the asking your instructor a question. The only people who see it are students.
When I am viewing a public course as a guest and not logged into Canvas, I am not a student (I am an everyone).
Would it be possible to make the links to the information you're trying to hide to every role other than Everyone? Deselecting Everyone would not show it to those guests in your public courses. They would still be available to registered users of your public courses.
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.