Community & Support

drop down horizontal menu with the nice_menus module

Hi, everyone, hope you will be willing to give a hand here.
I've just tried the nice_menus module which adds that drop down DHTML functionality
to a drupal powered site menu. For who hasn't tried the module it basically generates a
javascript drop-down style menu for the navigation.
I really need a menu that works like the ones I get from the nice_menus module but I
need it to be horizontal.
Would there be a way to bring the navigation menu just below the header of the page
and have it do be a drop down menu?
Can anyone tell me how I could achieve this kind of result?
suggestions are well accepted!

thank you

Comments

go to administer - blocks -

go to administer - blocks - then behind the menu click op configure - choose Menu Style: down

Then place the menu on the position you want.

I tried that but

I tried that but I still am not getting what I want. All the menu items are displayed vertically one on top
of each other. I want them to be rendered horizontally, each item displayed side-by-side compare to its neighbours.
I think the problem is that the nice_menus module is a block module and by default placed on the left or right side
of the page.
I've also seen the code and it uses

    ,
  • to implement the menu. Thats probably why it will always go onto
    a new 'line' for each menu link.
    Any other idea of how to get my menu horizontal?

You're right, sorry.

Yeah, I tried to do that too, but it didn't work. I don't think there are any modules that do that.

What I suggest doing is possibly copying all the links on your current menu, getting rid of your menu, then creating a horizontal drop-down menu with HTML and pasting it into your Secondary Links. (Note that this only works if your Theme has the Secondary Links towards the bottom of the top area.)

If you don't want to do that...well I'm not sure what you should do. I don't know of any modules that would do that, but if there were that's be really kewl. Sorry, and good luck!

Something or rather,
Natsuki Orsiko

Got it!

I was using drupal 4.6 with its nice_menus module. Try using drupal 4.7 instead with the 4.7 module (of course!!)

Hi, I have my menu perfectly

Hi,

I have my menu perfectly horizontal.

i found something in the css that maybe can help you.

ul.nice-menu li {
  position: relative;
  float: left;
  display: inline;
  width: 94px; /* Width of Menu Items */
  background: #ffffff; /* IE6 Bug */
border: 0px solid #eee;
text-align: center;
}

when i remove the float: left; all the menu items are displayed vertically one on top
of each other.

do you have that float in your css file? (nice_menus.css)

I tested out what you were

I tested out what you were saying, but the vertical one has that too. Puzzling - sorry, can't help you.

demo

could someone post an url where people can see this please? it sounds good.
-----
Drupal ecommerce, at www.drupalecommerce.com is a new site written using language that Drupal beginners and intermediate users can understand. It has about 300 unfinished pages. 2 tutorials for views module under "Modules"

can you place a screenshot

can you place a screenshot of it?

Are the menus on top of each other or are the submenus on top of each other?

drop downs in civicspace and/or bluemarine themes

How about using civicspace theme, editing the primary and secondary links which by default are displayed
horizontally and somehow plugin in to those the javascript popups?
has anyone got any idea of how this hack could be done?

There is another linked post on the theme development forum, the topic should be something like "civicspace theme
primary links configuration".

I also managed to get a result editing the primary links in the bluemarine theme.
I put in there my menu links, added some css and javascript.. and I managed to get a decent drop down menu.

In 4.6, you could insert the following code into page.tpl.php just above or below where primary_links would usually appear...

<?php
$block
= module_invoke('nice_menus', 'block', 'view', 1);
print
$block['content'];
?>

Change the '1' to what ever number your nice_menus ID is. You'll need to disable this menu on /admin/block and tweak CSS of course.

I got this php snippet from here http://drupal.org/node/26502

Hope this helps.

-jd

Problem with the above snippet

I was pretty excited about the above php snippet but I can't get it to work. I'm using CivicSpace 0.8.3 and the Box_grey template. I have disabled primary and secondary links. I added the code to my page.tpl.php (without removing anything from the original file) but it makes anything between the "nice menu" and the site footer disappear. No side blocks, no content. Any ideas?

EDIT: Just a note, I added the code within the div (id="top-nav") that also contains the primary and secondary links.

Well, I guess that was a

Well, I guess that was a problem with box_grey... I switched to bluemarine (phptemplate) and added a tr within the header table, containing the above code. It worked.