McMaster University

Faculty of Health Sciences
Web Design

Scope of Search

How to turn off javascript automation of the left navigation bar for a single page only?

The automated version of the left navigation bar uses javascript to control drop downs and highlighting of links. If a page is linked from the content area of your website but not from the left navigation bar, you may want to control the drop down and highlighing manually for that page. Or you may decide to control the drop down for another reason. If you need or decide to turn the automation off for a single page only but still want automation for other pages, then follow tshe instructions below:

  1. Check out (or get) the file for the page for which you want to turn off the automatic drop down and control it manually using CSS.
  2. Set the automatic_left_nav variable to false in the in the "head" editable region above the onload_function() as follows:

    <script type="text/javascript">
    <!--
    automatic_left_nav = false;
    function onload_function() {
    return;
    }
    //-->
    </script>
  3. The left navigation will now display with all nested links displayed for all pages. The dropdown and highlighting of links can then be controlled manually by putting the CSS code in each page. For example,

    Left navigation manual drop down control