remove menu in essentialnavbar

remove menu in essentialnavbar

by Trine Michelsen -
Number of replies: 8

Hi

Is there a way to remove the essential menu that is to the left in the in the navigation bar? 

I mean the one that has "This course" at the top and then when it opens: People / Quiz / Forum / Ressources...

Any help would be greatly appreciated!

Cheers

Trine

Average of ratings: -
In reply to Trine Michelsen

Re: remove menu in essentialnavbar

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi,

If you want to remove that menu, you will need to have access to the file that is in yout Moodle site.

essential/layout/includes/header.php

and this is the section you need to remove:

https://github.com/gjb2048/moodle-theme_essential/blob/master/layout/includes/header.php#L152-L154

To do this you only need a simple text editor like Notepad to open the file. delete the code and then save it.

Hope that helps?

Cheers

Mary

In reply to Mary Evans

Re: remove menu in essentialnavbar

by Jona Turner -

Hi Mary, 

 

I actually believe it's this one: https://github.com/gjb2048/moodle-theme_essential/blob/master/layout/includes/header.php#L163-L165

Just wanted to make sure people aren't deleting the wrong bits!

 

smile


Also, if you can't get to the server files, you can just add the following CSS to your Custom CSS box:

.navbar .navbar-inner #custom_menu_activitystream{ displaynone; }
 
This will only hide the menu though, not remove it.
In reply to Jona Turner

Re: remove menu in essentialnavbar

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

The thing is with themes you can never really satisfying everyone. Either they want something that is not there or they want it removing because it is!

Thanks for pointing this out.

I dare say these should be optional menus anyway.

Ah well.glad I don't maintain this theme.

lol

Mary

In reply to Mary Evans

Re: remove menu in essentialnavbar

by Just H -

Dumb question by why not just use custom CSS to not display it rather than hack the code with the resulting pain in the proverbial when upgrading?

For some reason I had to use "!Important" which I think I read somewhere should be avoided but the following seems to work for me on a test site:

#custom_menu_activitystream {display: none !important;}


In reply to Just H

Re: remove menu in essentialnavbar

by Jona Turner -

.... Same thought process ....

smile

In reply to Jona Turner

Re: remove menu in essentialnavbar

by Just H -
Probable difference being ... I don't really know what I'm doing big grin
In reply to Just H

Re: remove menu in essentialnavbar

by Trine Michelsen -
Thanks everyone! Have done the simple solution adding custom css and the menu is now not displayed wink


On to next menu problem: I've been asked to also modify the menu on the right, the user menu that shows throughout the site and links to grades, forums, profile, etc. The idea is to only leave the links to user preferences and logout and hide the link to Debates, Forum, Calendar and Grades. Can I comment these out? In which file? I'm not sure I can add this question to this thread or if I'm supposed to open a new one?

Cheers

Trine

In reply to Trine Michelsen

Re: remove menu in essentialnavbar

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Trine,

The best solution for a site specific bespoke customisation that is resilient to theme updates is a child theme.  There is a bare bones template for one called 'essentials' that comes with the theme for you to use or I'd be happy to create one for a fee given a defined list of requirements.

Kind regards,

Gareth