Change Bar Navigation to Drop Down Menu (v. 2.84 - 2.9)

Note: A new drop down menu include (%CATEGORY_DROPMENU%) is included in the 2.91 and 2.92 versions. Only use the modification below for versions 2.84 through 2.9.

To turn the bar navigation for categories into a drop down menu (a horizontal menu in which subcategories drop down as they are moused over) in version 2.9 beta:

  1. In your template, use the style include:

    %CATEGORY_BAR%

    which references the file:

    navbar_bar.php
  2. Open the navbar_bar.php file in the /enc/ folder of your site, and change "yes" to "no" in the line:

    setcategories($parentcat, $usecatval, 0, "", "", "
  3. [%%TEXTLINK%%]", "barcat", 0, 0, "", "no", "no", "yes", $extralinks);
  4. so you have:

    setcategories($parentcat, $usecatval, 0, "", "", "
  5. [%%TEXTLINK%%]", "barcat", 0, 0, "", "no", "no", "no", $extralinks);
  6. In your template's styles or external style sheet, add:

    .sb_hlinks.sbnav_bar { 
    padding: 0; 
    }
    
    .sbnav_bar ul > li > ul { 
    display: none; 
    }
    
    /* NAVIGATION - BAR DROP DOWN */
    @media screen and (min-width: 800px) {
    
    .sbnav_bar ul li {
    min-height: 30px;
    }
    
    .sbnav_bar ul li:hover > ul { 
    position: absolute; 
    display: block; 
    width: 200px; 
    top: 40px; 
    left: 0; 
    z-index: 49; 
    }
    
    .sbnav_bar ul li:hover ul li > ul { 
    left: 199px;
    top: -1px;
    }
    
    .sbnav_bar ul li:hover > ul li { 
    display: block;
    }
    
    .sbnav_bar ul li:hover { 
    position: relative; 
    z-index: 99;
    }
    
    }
    
    /* COLORS */
    
    /* subcategory background/border color */
    .sbnav_bar ul li:hover > ul { 
    background-color: yellow;
    border: 1px solid green;
    }
    
    /* highlighted subcategory background */
    .sbnav_bar ul li ul li:hover {
    background-color: pink;
    }
    
    /* highlighted subcategory text */
    .sbnav_bar ul li ul li:hover a {
    color: purple;
    }

    Changing the following as needed:

    • width: 200px; The width of each navigation block.

    • left: 199px; The starting point of the subcategory fly out (should be less than the navigation block width).

    • background-color: yellow; The background color of the drop down subcategories.

    • border: 1px solid green; The border color of the drop down subcategories (use border: none; if you do not want a border).

    • background-color: pink; The highlighted subcategory background.

    • color: purple; The highlighted subcategory text.

  7. Save the template or style sheet.