How can i create a primary Link dropdown menu

thanks,

Paulo Bico

CommentFileSizeAuthor
#4 style.zip5.87 KBwebmatter
#3 style.zip5.86 KBwebmatter
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webmatter’s picture

Hi Paulo, in order to have an horizontal dropdown menu you would need to install the module nice menus
http://drupal.org/project/nice_menus

In order to work properly with Drupal 7 it's recommended to patch the module nice menus with the following patch
http://drupal.org/node/1002054

Then you would need to replace the code for the menu in order to show a nice menu dropdown instead. This would be in page.tpl.php line 72
print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'inline', 'clearfix')), 'heading' => t('')));

Replace this line with

print theme('nice_menus_primary_links'); 

Now you would have to adjust the css for the menu in order to float right and have the dark look and feel of the theme. I am already working on it so if you want to wait the css for nice menus dropdown will be included in the next version of the theme. Hope this helps.

ThaRaven403’s picture

Hi,

I'm currently looking to implement the nice menus dropdown into the theme (for drupal 7). I've seen your post about adjusting the CSS but I'm actually new to CSS development. I thought that sending the same arguments in the theme method call would result in the CSS being applied, but I've seen I was wrong.

So my question, if you've started working on this, is there a way to either see the code you've done so far, or to give me a heads up as to where I should be modifying code to make it work (i.e. sections in the CSS that need to be worked on) ? This way I could probably help with this once I know where to look and could send you back the modified code.

Thanks,
Bruno

UPDATE: Here's what I have so far... Basically I copied the whole "main-menu" section in the CSS file and renamed to "nice-menu-0" ( I know it's probably not the best way, but to try to have something working...). What it gives me is the menu items correctly aligned, but the "middle" png image doesn't apply to the formatting (the left and right do though) so the menu item is gray instead of having the black background. As for the dropdown menu, it "exists", the mouse cursor changes when hovering over it (I can click on it and it works), but it's invisible.

webmatter’s picture

FileSize
5.86 KB

Hi I am attaching a css with some nice menu modifications so far. Still not perfect but hope it helps a bit (it's for the 7.0 version only)

webmatter’s picture

FileSize
5.87 KB
ThaRaven403’s picture

Thanks a lot for the quick answer, this helps a lot! I'll compare your files with what I did to understand what I did wrong and will try to make the dropdown menu fit to the same size.

I'll keep you posted on this, thanks
Bruno

curiousecurity’s picture

Version: 6.x-1.2 » 7.x-1.0-beta3

Hello webmatter,

First off, thanks for porting this theme to Drupal. I know this thread has been dormant for some time, but I wanted to know if you had integrated the drop-down menus that the Black Piano theme for WordPress has, and possibly when the next release of your theme will be out?

Thanks!

www.curiousecurity.com

EDIT: I found more people wanting the same from this post http://drupal.org/node/929074. The post was closed as "Status: needs work » closed (fixed)" 1 day after a user pleaded, and offered compensation to continue work on the theme.