Hiding Top and sideNavigation menu items - BCU theme

Hiding Top and sideNavigation menu items - BCU theme

by Annali Nicolaou -
Number of replies: 9

Hi,

I am running Moodle 2.8, I have implemented the BCU theme. This theme has a top navigation menu, ass well as a navigation menuon the left sidebar.


In the top navigation menu, I have the following links:

  • Home
  • My Home
  • Events
  • My Sites
  • Help (Which I added myself)

I need to remove/hide some of these headings, as they are not useful/relevant to my site. I cannot seem to find where in Moodle or in the Code to remove these headings.


In the sidebar navigation menu, I have these links:

  • Site pages
  • My profile
  • Courses

I only need my students to see their profile, and edit some of their details, such as password, update a mail address etc.

Where can I do this, is it possible to change this navigation?


Any assistance with this would be greatly appreciated!


I have attached a screenshot.

Thank you

Annali




Attachment menus.jpg
Average of ratings: -
In reply to Annali Nicolaou

Re: Hiding Top and sideNavigation menu items - BCU theme

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

Hi,

You could try...

.block_navigation ul.block_tree.list a[href="http://localhost/moodle29/my/"] { 
display: none;
}

Just make sure you replace the URL inside the quotes " http://localhost/moodle29/my/ " with your own site URL.

As for the Top Links these you can set in the BCU settings page! There is an option to choose which you want to have displayed.

Cheers

Mary

Average of ratings: Useful (2)
In reply to Mary Evans

Re: Hiding Top and sideNavigation menu items - BCU theme

by Annali Nicolaou -
Hi Mary, Thank you so much, your post was very helpful!

Please excuse my ignorance, but I am struggling to find where in the BCU settings you decide/set the top menu links, could you please assist me as to where these settings can be found.

I appreciate your assistance!


In reply to Annali Nicolaou

Re: Hiding Top and sideNavigation menu items - BCU theme

by Just H -
Home > Site administration > Appearance > Themes > BCU > Header
In reply to Just H

Re: Hiding Top and sideNavigation menu items - BCU theme

by Annali Nicolaou -
Hi Mary,

Thank you for the reply,  Your feedback is really helpful!

Issue 1

For the life of me, I just cant seem to hide the headings:

  • Events
  • My sites
I have managed to hide the "Home" nav bar with the followin CSS:

.navbar .nav > li:first-child > a {
  display: none;
}

But the other 2 headings does not seem to have a unique class identifier.

Issue 2

I also need help with hiding the links in the top right corner when hovering over the logged in users name.
Screenshot attached.

Issue 3

I have added a new nav button called "Help" which I am trying to link to an external HTML site located on the same server as my LMS, but I cannot seem to find the place where you insert the path where this button must be linked.
Screenshot attached.

Thank you so much
Annali
Attachment help_navbar.jpg
In reply to Annali Nicolaou

Re: Hiding Top and sideNavigation menu items - BCU theme

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

Hi,

Since you have a number of elements that you do not want it may be worth your while physically removing them from the theme files.

Mary

In reply to Mary Evans

Re: Hiding Top and sideNavigation menu items - BCU theme

by Annali Nicolaou -

Hi Mary,


Thank you, but WHERE in the theme files, Ive checked in the /my directory, and still cant seem to find it,


also I still cant seem to find where I link the help file?


Please assist in more detail?


Thank so much



In reply to Annali Nicolaou

Re: Hiding Top and sideNavigation menu items - BCU theme

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

Hi...

This is the code you need to find in bcu/layout/includes/header.php

    <div id="navwrap">
        <div class="container">
            <div class="navbar">
                <nav role="navigation" class="navbar-inner">
                    <div class="container-fluid">
                        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </a>
                        <div class="nav-collapse collapse ">
                            <?php echo $OUTPUT->navigation_menu(); ?>
                            <?php echo $OUTPUT->custom_menu(); ?>
                            <?php echo $OUTPUT->tools_menu(); ?>

                            <ul class="nav pull-right">
                                <?php
                                if (empty($PAGE->layout_options['langmenu']) || $PAGE->layout_options['langmenu']) {
                                    echo $OUTPUT->lang_menu();
                                }
                                ?>
                                <li class="hbl"><a href="#" class="moodlezoom"><i class="fa fa-indent fa-lg"></i> <span class="zoomdesc"><?php echo get_string('hideblocks', 'theme_bcu') ?></span></a></li>
                                <li class="sbl"><a href="#" class="moodlezoom"><i class="fa fa-outdent fa-lg"></i> <span class="zoomdesc"><?php echo get_string('showblocks', 'theme_bcu') ?></span></a></li>
                                <li class="hbll"><a href="#" class="moodlewidth"><i class="fa fa-expand fa-lg"></i> <span class="zoomdesc"><?php echo get_string('fullscreen', 'theme_bcu') ?></span></a></li>
                                <li class="sbll"><a href="#" class="moodlewidth"><i class="fa fa-compress fa-lg"></i> <span class="zoomdesc"><?php echo get_string('standardview', 'theme_bcu') ?></span></a></li>
                            </ul>
                            <div id="edittingbutton" class="pull-right breadcrumb-button"><?php echo $OUTPUT->page_heading_button(); ?></div>
                        </div>
                    </div>
                </nav>
            </div>
        </div>
    </div>

Hope that explains it?

The one highlighted in pink are the two sections you wanted to hide. So you can remove those two using a Text Editor like Notepad. Then save the file back to your server.

This is assuming you have access to these files?

The alternative is remove the theme from Moodle and then download a new copy of BCU Unzip the file to your Desktop. Make the changes to the header.php. Then compress the amended BCU theme folder and then reinstall it.

In reply to Annali Nicolaou

Re: Hiding Top and sideNavigation menu items - BCU theme

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

In addition to my last comment. The HELP link should be in the User menu in the top navbar...top right.

Cheers

Mary

In reply to Mary Evans

Re: Hiding Top and sideNavigation menu items - BCU theme

by Annali Nicolaou -

Hi Mary,


Hope this message finds you well.


I am once again struggling with this,


I need to change the path of the 'HOME' link on the BCU theme, I have checked under:

Appearance > BCU > Header

But the home link is not listed there?


Please could assist to tell me where in the code I can change this link?


Thanks

Annali



Attachment help.jpg