Hi, can i use the Top navigation bar with a drop down menu for some items ?
When i click on an item in the navigation bar i need to see a drop down menu with more links, can i do that ?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Deepika.chavan’s picture

Hi,
Yes, you can use nice menus module for that.
I tried the same thing on my local site.
1. I enabled the module.
2. Added following code in 'ad_novus.info' file after line no-5 i.e. stylesheets[all][] = style.css line.
code to create new region and to add local.css file.

stylesheets[all][] = local.css

regions[left]  = First sidebar
regions[right] = Second sidebar
regions[links]= Header Links
regions[content] = Content
regions[header] = Header
regions[footer]  = Footer

3. Removed following code from page.tpl.php :

  <?php if ($primary_links) {?> 
    <div id="primary">
    <?php print preg_replace('/<a (.*?)>(.*?)<\\/a>/i','<a \\1><span>\\2</span></a>',theme('links', $primary_links, array('class' =>'links', 'id' => 'navlist'))); ?></div>
    <?php }?> 

And added following code instead to print the new 'links' region instead of primary links.

  <?php if ($links){ ?>
    <div id="primary">
      <?php print $links ?>
    </div>
    <?php } ?> 

4. Enabled 'Nice menu 1' block in the Header links region (here - /admin/build/block).
5. Created local.css file (Note: I have already added local.css in 'ad_novus.info' file in the above code.)
6. Added following css in local.css file.

.nice-menu-hide-title, #block-nice_menus-1 h2 {
  display: none;
}

ul.nice-menu, ul.nice-menu ul {
  border-top:medium none;
}

ul.nice-menu li {
  background-color:transparent;
  border-style:none solid solid;
  border-width:0;
  float:left;
}

#block-nice_menus-1 {
  border: none;
  background: none;
}

#primary ul#nice-menu-1 {
  margin-top: -15px;
}

ul.nice-menu-down li.menuparent, ul.nice-menu-down li.menuparent:hover {
  background: transparent url(../../../modules/contrib/nice_menus/arrow-down.png) no-repeat scroll right center;
}

ul.nice-menu-down ul li {
  background: transparent url(images/menu-bg.png) repeat-x scroll 0 0;
}

ul.nice-menu ul {
 top: 4.8em;
}

#primary a.active {
  background:transparent none repeat scroll 0 0;
  color:#FFFFFF;
}

7. Cleared the cached data here- /admin/settings/performance.
I hope the steps are clear. Please check the attachments.
HTH!!

Rgrds,
Deepika Chavan.

Anandyrh’s picture

This did not work for 6.x-1.6 version! I am facing this same Issue to get the drop down menu working.