An Excellent Drop-Down Menu Module

sangamreddi - January 3, 2006 - 07:14

I have been wondering for drop-down menus since longtime and its difficult to find a solution for a non-programmer like me. Atlast "Jake Gordon" has made an excellent module Nice Menus . Thanks for the excellent work and keep it up. Though several enhacements has been made to coming Drupal 4.7 menu feature still it lacks drop-down functionality. I hope with this module lacking drupal drop-down Menu feature will be no more.

Sunny
www.gleez.com

Thanks!

jakeg - January 3, 2006 - 07:22

Thanks Sunny! Yes, I released the module yesterday following this discussion and its still a little buggy but gettting there very quickly. Please let me know of any improvements you think I can make to it, or any bugs in the system.

Also, it should be noted that the module is for 4.7/head only at the moment at least.

Images missing

sangamreddi - January 3, 2006 - 07:54

Hi,

I have just installed and it's working fine only the images are missing. I haven't find the arrow-down.gif, arrow-right.gif these images.

It's excellent, only missing horizontal thing in the second layer. Though i am not intrested as of now someone would need it.

Sunny
www.gleez.com

get the latest cvs from

jakeg - January 3, 2006 - 08:52

get the latest cvs from http://cvs.drupal.org/viewcvs/drupal/contributions/modules/nice_menus/ which I just upudated 2 minutes ago, including the arrows.

Do you still have the bug you mention?

To make this work with 4.6, I think you can do the following:

If you want the module to work in 4.6, I think all you have to do is edit one line in nice_menus.module:

drupal_add_js(drupal_get_path('module', 'nice_menus').'/nice_menus.js');

... should be changed to:

drupal_set_html_head

*pointless post that is

zoro - January 3, 2006 - 08:58

*pointless post that is simply to subscribe to thread* :)

Working fine

sangamreddi - January 3, 2006 - 09:55

Now working fine. Thank You once again.

Sunny
www.gleez.com

Drupal 4.6 compatiblity ?

MaineWebworks - January 3, 2006 - 20:16

jakeg -
Great menu system! I'm using 4.6 and would love to get this implemented.
But, I'm a html/css designer not php developer...

It seems like I'm missing something here:

If you want the module to work in 4.6, I think all you have to do is edit one line in nice_menus.module:

drupal_add_js(drupal_get_path('module', 'nice_menus').'/nice_menus.js');

... should be changed to:

drupal_set_html_head

I'm sure there's a closing statement ( ;) at the end of the line. Is there anything else?

TIA for any help.

I also tried adding the JS into the HEAD of page.tpl.php and it didn't work...

sorry i don't have my laptop

jakeg - January 3, 2006 - 23:34

sorry i don't have my laptop with me right now, but basically get rid of the drupal_add_js line and replace it with drupal_set_html_head() with a link to the javascript file between the ()... something like

script type='text/javascript' src='modules/nice_menus/nice_menus.js'

... i can't write the full code hear because drupal bulks at the 'suspicious data'

thanks alot, it works

enky - January 4, 2006 - 04:24

hi jakeg,

the nicemenus module is cool, thank a lot,

enky

Settings page not working in 4.6

nydrupalfan - January 4, 2006 - 05:19

Nice work on the module!

The menu blocks work great for me in drupal 4.6.5 after making the above change within a complete script tag.

The only problem I am having is that none of the administrative options are appearing on admin/settings/nice_menus. I only see a text description of the module and then two buttons (save and restore defaults). Could there be another function that isn't work in 4.6?

Thanks for the help.

Hmm... okay, yeah, the forms

jakeg - January 4, 2006 - 09:03

Hmm... okay, yeah, the forms API stuff won't work in 4.6. I may look at porting th emodule to 4.6 at some point, but if anyone else wants to too then they're more than welcome

Yeah, all API stuff is different

pgregg - January 4, 2006 - 14:41

I began porting it but gave up because my boss wants to see something soon, so I'm just going to find something else that'll work in 4.6

I'm sure there must be a way to query what version of drupal is running... (/me goes to check - hmmm doesn't seem to be - crap). we need a DRUPAL_VERSION 4.63 type constant

Anyway, I may as well give back what I did to start the backport - good luck:

// Implemention of hook_menu()
function nice_menus_menu() {
  // Load the necessary JavaScript on every page
  #drupal_add_js(drupal_get_path('module', 'nice_menus').'/nice_menus.js');
  drupal_set_html_head('<'.'script language="JavaScript" src="' . drupal_get_path('module', 'nice_menus').'/nice_menus.js' . ' type="text/javascript"></script>'); # sorry for the '<'. hack - drupal website won't let me actually post the script as a tag
  theme_add_style(drupal_get_path('module', 'nice_menus').'/nice_menus.css');
}

// Implementation of hook_settings()
function nice_menus_settings() {
  $form['nice_menus_number'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of Nice Menus'),
    '#size' => '2',
    '#description' => t('The total number of independend nice menus you want. You configure them as normal in admin/blocks'),
    '#default_value' => variable_get('nice_menus_number', '2')
  );
  #return $form;

  # pgregg 4.6 hack
  $output = '';
  foreach($form as $formname => $data) {
    switch($data['#type']) {
      case 'textfield':
        $output .= form_textfield(t($data['#title']), $formname,
                    variable_get($formname, 'Default setting'),
                    $data['#size'], 255,
                    t($data['#description']));
        break;

      case 'checkbox':
      default:
         break;
    }
  }
  return $output;
}

Not much, but it's a start. Good luck and thanks for your work on it jakeg - I look forward to being able to use it in the future.

I'm working on this now.

jakeg - January 4, 2006 - 15:59

I'm working on this now. Should be 4.6 compatible by end of the day... DONE!!!

get it here

Excellent! I needed to add

nydrupalfan - January 4, 2006 - 16:46

Excellent! I needed to add a /script tag in the set_html_head function to get it to work.

The only administrative option that shows up in 4.6.5 for me is:
Number of Nice Menus:
The total number of independend nice menus you want. You configure them as normal in admin/blocks

Should there be more?

Thanks again for your great work jake.

No, that is all. Within the

jakeg - January 4, 2006 - 16:56

No, that is all. Within the blocks themselves you configure the type of dropdown they are and which menu tree they come from

Friends electric theme

nydrupalfan - January 5, 2006 - 00:48

I am playing around with the menu module in the Friends Electric theme and noticed that there is a gap between individual menu options. Can anyone tell which css property is causing this? It seems to be in the theme itself as far as I can see.

edit: I fixed it by changing one of the table margin settings to 0 in the theme's style.css file.

Nice addition

laura s - January 4, 2006 - 06:14

Looking forward to trying it out!

Laura
===
pingVisionrare patternscattered sunshine

several enhancements

der - January 4, 2006 - 19:04

Nice module. I just submitted a patch for several enhancements to this module.

Nice Enhancements

sangamreddi - January 4, 2006 - 19:48

Thanks Der nice enhancements to module. I haven't tested yet. I'll post the outcome.

Sunny
www.gleez.com

Excellent menu ... but

patrickharris - January 5, 2006 - 02:57

I have avoided menus like this previously, because some people find it hard to navigate with the mouse to the "third level" in. If the mouse leaves the second menu for a moment, the whole pop up disappears.
Usability can be improved if the pop-up menu stays around for a second or two after the mouse has left it. I'm sure this delay could be added with javascript?

Gosh, I'm not describing this well - I hope you know what I mean.

yup i understand completely,

jakeg - January 5, 2006 - 08:28

yup i understand completely, though don't know how to make the changes you suggest

While I haven't looked at

zoro - January 5, 2006 - 09:36

While I haven't looked at the source yet - I would imagine that it'd be a simple fix...

Instead of:

If(MouseOut(MyMenuThing))
{
   MyMenuThing.close();
}

....

Setup a separate timer function:

If(MouseOut(MyMenuThing))
{
   new MyMenuTimer(MyMenuThing);
}

.... but that's a gross over-simplification :)

problem is, its all done by

jakeg - January 5, 2006 - 10:01

problem is, its all done by css, so i don't think this is possible

Ah - so it's just

zoro - January 5, 2006 - 10:16

Ah - so it's just hiding/unhiding preset div's?
Apologies - I thought it was using javascript.

That's what I get for not looking at the source ;)

Background images can flicker

sherwoodseo - January 12, 2006 - 22:20

Another "stick around for a sec" issue concerns the use of background images. The JS that is used for IE rollovers swaps between on and off modes instantly, and the background image repaints itself painfully slow. I added a JS image preloader into page.tpl.php, but it doesn't seem to help - you still see the image files getting called in the IE's status bar.

Is this an issue with the JS included? Can the image preloader be integrated somehow?

{thanks in advance - great module!}

Sherwood Stranieri
NCC Boston / Search Engine Marketing

I know exactly what you mean

PurpleEdge - January 5, 2006 - 10:22

I know exactly what you mean - my menu drives me nuts [g]!

A solution is to make the height of each LI a bit higher, which would work for a drop down. In my case this defeats the purpose somewhat because for a large menu the items can disappear off the bottom of the page and can't be selected in FF, but can be scrolled to in IE. It's also possible to change the level of overlap of submenus, which can reduce the number of mis-hits.

My compromise is to also include a standard Drupal menu, so I have the best of both worlds.

The real beauty of drop menus is that they don't require reloading of the page to traverse all the submenus - which is why I have persevered with mine.

http://www.comformark.com

THX & QUS

holydrupal - January 5, 2006 - 22:21

thanks man
I search for this :D
great
now I have nice design too :D
that long menu was really bother me alot in design!

By the way in templatemonster site there are some flash dropdown menu in top which have effect and nice movement when they comes down.
Could u add this function to Nice Menus modules?
Is it possible?
Can we craete this function with JS?
www.templatemonster.com

Its not something I'm giong

jakeg - January 6, 2006 - 09:15

Its not something I'm giong to try because I can't do flash and aren't very good at javascript.

Manual Menues

cosmicdreams - March 20, 2006 - 22:05

first my solution:
With version 4.7 you have a good deal of control over the menues. You could flatten your menues by rearranging them in the menu admin section.
I used a similar method to solve an issue of the menues being to tall. I just made an additional tier and called it more to handle to overage. You could just as easily make rearrange everything on one tier.

Second:
I too would like to profess my job for this module. I also like the fact that its themeable. Thank you for this.

WooHoooo - THANK YOU!!

colorado - January 7, 2006 - 09:35

Simply awesome.

Now if only we could choose a Vocabulary or Terms heirarchy to grab with these menus (in 4.6) and attach them to the new Categories in 4.7. Wow!

Hmm.. I bet this works with

colorado - January 7, 2006 - 11:38

Hmm.. I bet this works with menus built by taxonomy_menu...

Anyone try it yet?

It will work with any menu

jakeg - January 7, 2006 - 13:19

It will work with any menu items that appear at admin > menus.

Yea, it works fine

Adrian Freed - January 8, 2006 - 18:33

When you use clean URL's you can't see the menu id's so I hacked the menu stuff to display the id next to the menu name.

I don't follow. The latest

jakeg - January 8, 2006 - 19:03

I don't follow. The latest version of my module for 4.6, 4.7 and cvs should enable you to select a menu by name not id

all versions are working well with menu names

sangamreddi - January 8, 2006 - 21:34

4.7
http://drupal.org/files/projects/nice_menus-4.7.0.tar.gz
4.6
http://drupal.org/files/projects/nice_menus-4.6.0.tar.gz
CVS
http://drupal.org/files/projects/nice_menus-cvs.tar.gz

All 3 of them have been updated and working fine. U can see them in action on my demo site too http://careers.gleez.com

Once again thank's for Jake Gordon for backporting it for 4.6.

Sunny
www.gleez.com

Sorry but the 4.6 one you give

Adrian Freed - January 8, 2006 - 21:58

has
this line:

$form .= form_textfield(t('Menu Tree'), 'nice_menus_menu_'.$delta, variable_get('nice_menus_menu_'. $delta, '0'), false, false, t('The menu tree number (ID) from which to show a nice menu. Find out what this is at admin/menu and noting the ID in the URL for the menu you want to use'));

When it needs something like this:

$form .= form_select(t('Menu Tree'), 'nice_menus_menu_'.$delta, variable_get('nice_menus_menu_'. $delta, '0'), menu_parent_options(0),
t('The menu tree from which to show a nice menu.'));

(I just backported it myself)

ah, okay, 4.6 doesn't enable you to select menu by name

jakeg - January 8, 2006 - 23:15

ah, okay, 4.6 doesn't enable you to select menu by name. Instead you have to give the menu ID. To get this, go to admin/menu and look at the ID in the URL of the menu trees there.

If someone submits a patch then I'll put it into 4.6. But I don't have time to make the patch right now myself (4.7 uses forms API, 4.6 doesn't). This isn't a critical fix (i.e. it works without it), its a usability issue.

I made the change noted above

laura s - January 8, 2006 - 23:42

...and now I have a drop-down selector for the menu is the settings screen.

The code change works!!

Laura
===
pingVisionrare patternscattered sunshine

yeah it is a one line change

Adrian Freed - January 9, 2006 - 03:37

I am too busy this week to make a patch as I have added other things to nicemenu (to support a nicemenu bar as primary links) and would have to go backwards to create a solid patch. Laura s confirms that my one line change does the trick so people can hack it in by hand until a patch.

I suspect this nice module is going to get a lot of use and more feature suggestions...........

fire away with them, but be

jakeg - January 9, 2006 - 08:35

fire away with them, but be aware that most new features now will go into 4.7 and not necessarily into 4.6 unless someone else can help backport.

horizontal menu?

NEOX - January 10, 2006 - 14:32

Nice Job, it' s a very cool module!

Sorry, probably it's a stupid question, but I don't understand how to make this menu horizontal ?!

with the module enabled, go

jakeg - January 10, 2006 - 14:45

with the module enabled, go to admin>blocks and edit the nice menu block you want to be horizontal. set its type to 'down' (i.e. menus drop down)

Thanks! Now it works great!

NEOX - January 10, 2006 - 14:56

Thanks! Now it works great! Nice Job!

this module works fine with

NEOX - January 13, 2006 - 10:37

this module works fine with other themplates you can download, but now i try to create my own template and have some problems. i wrote this in page.tlp.php:

head
?php print $styles ?
/head

body
?php echo   "div id='navigation'    $sidebar_left    /div" ?
?php echo   "div id='content'    $content    /div" ?
/body
/html

it works fine in firefox, but in ie the dropdown menu doesn't popup. i guess i need some more code in this template, but i don't know what. can somebody help me, please?

p.s. "< >" was cleared for this forum, because it was not possible to post.

You need to add the block regions

sangamreddi - January 13, 2006 - 10:36

Assuming your're running Drupal 4.7 beta-3.

<div><?php print $header ?></div> for Header reagion
<?php print $sidebar_left ?> for Left side
<?php print $sidebar_left ?> for right side.

Look at the default Theme (Bluemarine) U'll understand better.

Feel free to contact me.

Sunny
www.gleez.com

hm, i'm using 4.6.5, but if

NEOX - January 13, 2006 - 11:00

hm, i'm using 4.6.5, but if i write:

<?php print $sidebar_left ?>

it's still the same problem. it didn't help. :(

Had the same problem

sherwoodseo - January 13, 2006 - 15:56

jakeg commented at some point that IE can't use CSS to do the flyout action, so he devised a JavaScript to handle it. The neat_menu module uses Drupal to plant a JS call right into your template... but to enable that, you have to insert this into the head section of your template:

<?php print $head ?>

Check out this page for details:
http://drupal.org/node/11812

...and let me know how it works out, cuz I got this far and then stumbled on a couple more issues with IE and Safari.

- Sherwood

Now it works fine in IE

NEOX - January 17, 2006 - 15:24

Now it works fine in IE and Firefox. I had upgraded from 4.6.5 to 4.7beta3 and inserted <?php print $head ?>. Thanks for this information! I didn't see you have to insert this part for IE.

Horizontal Sub-Menus

mshaver - April 25, 2006 - 18:00

I was wondering if anyone has been able to hack the CSS to display one level of sub-menus horizontally? So the menu would be set to 'down' and the sub-menus items would display below the main links but would look similar to the top links.

Any ideas?

Mike

drop down not overflowing into main page

slazenger - February 22, 2006 - 23:21

I took JakeG's nice_menu implementation and reused the CSS code directly to develop a neat drop down menu system for the primary links (top navigation). This is for a journal site I am experimentally building, using a democratica-civicspace-derived theme.

The problem is that the drop down flows down nicely when there is NO content below the navigation bar I.e. when the div containers for the usaual three columns below (div left, div center and div right) are commented out completed, the menu flows down.

When the real content is presented below, the drop downs get truncated, after the first one, and I can tell its because of the
content below.

I tried playing around the with the overflow parameter and clear parameters in CSS, but I am missing something. I think I'm missing something elementary, could someone help out.

I'm using the three-columm democratica theme.

thanks for any help!
-S

You can try using z-index:

colorado - February 23, 2006 - 05:29

You can try using z-index: 10000; in your stylesheet for the element(s) you want to stay on top. I think you need to use also position: relative; above/before the z-index.

---
"Please drupal responsibly: give as much help as you get."

right!

slazenger - February 23, 2006 - 16:46

You were right. In the meantime I did get it right and posted my solution here. "position: relative" in the top container which holds the big UL for all navbar links inline and dropdown, with a z-index of above zero, works out for IE and FF.

Here's the solution comment.
http://drupal.org/node/43899#comment-75854

-S

Primary links in Nice Menu

justinian - March 3, 2006 - 17:59

Hi,
Thanks for the solution. It works great. You mentioned that you are using Nice Menu for Primary links. How are you doing that? I'm using 4.6.5. Do I have to upgrade to 4.7 for that to work?
Thanks,
Justinian

4.6 version also available

sangamreddi - March 3, 2006 - 21:11

4.6 version of nice-menus mdoule available
Sunny                      
www.gleez.com | www.sandeepone.com

Sorry, late reply

slazenger - March 7, 2006 - 18:01

I didn't use the module itself yet, and plan to do that later.
What I did right now is used the module's CSS files to render
the primarly links the way I wanted them to too. But to do this, I've hardcoded the

  • tree for the links in my page.tpl.php itself for now, (instead of the foreach loop). This isn't ideal, I realise, but its my short-term fix since I'm prototyping.

No worries

sangamreddi - March 7, 2006 - 23:24

Even i used the similar kind of ugly hack until nice menus module released.

Sunny                      
www.gleez.com | www.sandeepone.com

do you mean

slazenger - March 8, 2006 - 17:20

You mean you have since switched to using the nice menu module directly for top navigation primary links? How did you do this? I though this will require invoking some part of nice menu code/functions from within the primarly links/header portion of page.tpl.php -- i.e. the block level functions might not be usable directly. Am I wrong, or did you do somethign else neatly? -S

z-index fix won't work for select box menus

peligrorice - November 16, 2006 - 15:13

My menus were appearing below a select box in IE 5, this is an IE bug and the only fix that I have found is to use Iframes.

I searched for at least a full week and finally Treylane solved the problem, you can download the patched .js file from here (Post # 16)

Nice Module!

VinceDee - March 8, 2006 - 01:20

I love it. I've been hoping I'd happen across a drop down menu like this.

The only thing I can't figure out so far is whether I can get it to go horizontal so it can drop down menus from across the top of my page.

Thanks for the nice work

---------
The hottest Linux distribution? Ubuntu
Talk about Ubuntu Web Servers at:
http://www.ubuntuwebservers.com

Just go into your block's

jakeg - March 8, 2006 - 07:59

Just go into your block's settings and change its type to 'down' to get it to drop down. Of course you'll need to make enough horizontal space for all your top level items to fit in too. If you're using 4.7, I suggest putting it in the header region.

Jake
Drupal web services, London

That's what my problem is

VinceDee - March 8, 2006 - 17:24

I have the menu in the Navigation block that it defaults into on the left side bar. I tried already to change it over to "down" and it didn't do anything but make the menus drop straight down...but they were still stacked vertically on top of one another so it had an odd effect.

How would I get the menu into something like a header block using Drupal 4.6?

---------
The hottest Linux distribution? Ubuntu
Talk about Ubuntu Web Servers at:
http://www.ubuntuwebservers.com

Using 4.6 you'll have to

jakeg - March 8, 2006 - 19:11

Using 4.6 you'll have to modify your theme to make a wide enough div/whatever for the menu to go in.

Jake
Drupal web services, London

locating the css

elo15e - September 27, 2006 - 12:22

Hi,
I'm really finding your menu module fantastic - just what I needed!
How do I locate the CSS formatting for the header 'block', so that I can fit my lovely drop down menu? Is it #header?
Sorry if I'm being dum!

Claire

Horizontal menu in header has menu name above it

greg_y - March 15, 2006 - 18:07

Hi, Nice Menus is the perfect solution to my need for easy drop menus!

I have one issue under 4.7. When I place a nice menu in the header (in this case, Pushbutton theme), above the row of menu items is the menu name for that group of menus -- equivalent to the block title if the menus were on the sidebar. So the header looks like:

Menu Name
Drop Down Menu Item 1 ... Drop Down Menu Item 2 ... etc

Is there any way to hide that menu name line so only the actual menu items are visible? I haven't found any way to do it via simple configuration. The menu name is on a row all by itself and doesn't do anything, and I'd like the real estate back! :)

Hmm, the CSS file with the

jakeg - March 15, 2006 - 18:10

Hmm, the CSS file with the module should automatically display: none (hide) the header. Does it do that with a different theme?

Jake
Drupal web services, London

Blue Marine OK => issue w/ Pushbutton?

greg_y - March 15, 2006 - 19:12

It looks like under Blue Marine theme the extra Menu Name row is not there -- only the actual menu items on their own row. So that looks fine.

The problem in Pushbutton may be how the Menu Name is hidden --? When I use Firefox's Web Developer toolbar to get the properties of the Menu Name row that shows up in Pushbutton, it says it's h3:

.block .title h3 (line 403)

but I don't think the Nice Menu CSS is hiding h3, only h2 --?

/* most people won't want to see the menu's title */
.block-nice_menus h2 {
display: none;

I copied those two lines and changed "h2" to "h3" but that caused ... um, interesting consequences on the rest of the page. I'm obviously showing my CSS cluenessless here.

Also, while the toolbar indicates that both the theme css and nice menus css files are being used to display the nice menu items in the header, the Menu Name row above them seems to only be using the theme css.

Hope this makes sense!

I fixed this problem in

greg_y - March 24, 2006 - 20:23

I fixed this problem in Pushbutton theme by editing nice_menus.css to add lines after line 30:

/* most people won't want to see the menu's title */
.block-nice_menus h2 {
  display: none;
}
/* new lines start here */
.block-nice_menus h3 {
  display: none;
}

So far this hasn't had any consequences elsewhere that I can see.

link to external site in new window

justinian - March 19, 2006 - 18:27

I've set up a nice menu item to link to another site. Is it possible to have it open in a new window?

not at the moment, no. For

jakeg - March 20, 2006 - 09:12

not at the moment, no. For usability reasons, its suggested that links generally don't open in new windows as it disables the back button on someone's browser. if the user wants a new browser that should be their choice, and they can right click a menu and select 'open in new window/tab'

Jake
Drupal web services, London

it would be nice

justinian - March 23, 2006 - 18:39

It would be really nice to includes this feature in the module. For example, I'm linking to my cafepress store, which takes people to cafepress.com and therefore away from my site. In this case, using the back button isn't a good solution, as it could cause forms to reload.
I think your comment that people can just right click on the link assumes that people are more Web savvy than they are.

Yes, I agree that all

colorado - March 23, 2006 - 20:25

Yes, I agree that all modules and menus it should be as flexible as possible in giving site admins the option to determine how specific links will behave.

---
"Please drupal responsibly: give as much help as you get."

Yes, you can add

colorado - March 20, 2006 - 21:07

Yes, you can add target="_blank" to the link code in the nicemenu.module, but this will make all your nice menu links open in a new window.

If you need help on how to do that, just let me know.

---
"Please drupal responsibly: give as much help as you get."

Oh yeah, another possibility

colorado - March 20, 2006 - 21:22

Oh yeah, another possibility is the Links Package http://drupal.org/node/24719

---
"Please drupal responsibly: give as much help as you get."

4th level issue

nitrosx - April 13, 2006 - 15:23

Hy everybody

First let me say that I really appreciate all the work done with nice_menus module.
Works really well on my first ever drupal site.

Unfortunately, I found out that when my menu grew to the 4th level depth, the show/hide action on those levels wasn't working properly anymore.
So what??? I spent sometime and fixed the issue. Following you 'll find the patches required.

nice_menus.css.patch

--- nice_menus.css     2006-04-12 11:52:48.000000000 -0400
+++ nice_menus.css      2006-04-12 11:52:22.000000000 -0400
@@ -4,7 +4,7 @@
   <ul id='nice-menu-x' class='nice-menu nice-menu-TYPE'>
     <li><a href='#'>This is a menu item</a></li>
     <li class='menuparent'><a href='#'>A submenu</a>
-      <ul><li>...</li>
+      <ul class='submenu'><li>...</li>
       </ul>
     </li>
     ...
@@ -80,23 +80,39 @@
}

/* Show submenus when over their parents */
+/* 8 levels */
ul.nice-menu li:hover ul,
-ul.nice-menu li.menuparent li:hover ul,
-ul.nice-menu li.menuparent li.menuparent li:hover ul,
+ul.nice-menu ul.submenu li:hover ul,
+ul.nice-menu ul.submenu ul.submenu li:hover ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu li:hover ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu li:hover ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu ul.submenu li:hover ul,
ul.nice-menu li.over ul,
-ul.nice-menu li.menuparent li.over ul,
-ul.nice-menu li.menuparent li.menuparent li.over ul {
-  display: block;
-}
+ul.nice-menu ul.submenu li.over ul,
+ul.nice-menu ul.submenu ul.submenu li.over ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu li.over ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu li.over ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu ul.submenu li.over ul {
+  display: block;
+}

/* Hide sub-menus initially */
ul.nice-menu li:hover ul ul,
-ul.nice-menu li:hover ul ul ul,
+ul.nice-menu ul.submenu li:hover ul ul,
+ul.nice-menu ul.submenu ul.submenu li:hover ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu li:hover ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu li:hover ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu ul.submenu li:hover ul ul,
ul.nice-menu li.over ul ul,
-ul.nice-menu li.over ul ul ul {
-  display: none;
+ul.nice-menu ul.submenu li.over ul ul,
+ul.nice-menu ul.submenu ul.submenu li.over ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu li.over ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu li.over ul ul,
+ul.nice-menu ul.submenu ul.submenu ul.submenu ul.submenu ul.submenu li.over ul ul {
+  display: none;
}

+
/* Now stuff specific to the menu type (down, left or right menu pop) */

/* All VERTICAL (left/right) menus */

nice_menus.module.patch

--- nice_menus.module.20060412  2006-04-12 11:54:05.000000000 -0400
+++ nice_menus.module   2006-04-12 11:34:56.000000000 -0400
@@ -111,7 +111,7 @@
     foreach ($menu['visible'][$pid]['children'] as $mid) {
       if (count($menu['visible'][$mid]['children']) > 0) {
         $output['content'].= "<li id ='menu-$mid' class='menuparent'>".menu_item_link($mid);
-        $output['content'].= "<ul>";
+        $output['content'].= "<ul class='submenu'>";
         $tmp = _nice_menu_tree($mid);
         $output['content'].= $tmp['content'];
         $output['content'].= "</ul>";

Hope that this help.

not sure how to patch

TheFazz - June 3, 2006 - 06:18

i've installed the nice menus for version 4.7 in a horizontal and pulldown manner. however, at level 4 it shows the submenus by default which will result in level 4 menu clashes. nitrosx's patch looks promising, however i have no idea how to administer the patch. i am using a hosting service which does not allow me to do any other than thru the cpanel and ftp (no shell access). so any alternative ways to patch?

http://www.thefazz.com/

Patch??

llawnroc - June 23, 2006 - 16:28

Hi

I'm new to the world of Drupal (still only 2 days old!) and want to know how to use the code listed above to patch the files to get past this 4 tier issue.

Thanks

(Drupal based site in progress Llawnroc.net)

Seems like a lot of trouble

theiviaxx - October 17, 2006 - 00:33

The functionality is already there for level 1 through 3. Why rewrite the CSS for an additional level or two? I have tried just adding another li to the CSS as suggested in other threads, but with no luck. The CSS makes sense, just not sure it wont display that 4th level correctly. This is what i tried:

/* Show submenus when over their parents */
ul.nice-menu li:hover ul,
ul.nice-menu li.menuparent li:hover ul,
ul.nice-menu li.menuparent li.menuparent li:hover ul,
ul.nice-menu li.menuparent li.menuparent li.menuparent li:hover ul,
ul.nice-menu li.over ul,
ul.nice-menu li.menuparent li.over ul,
ul.nice-menu li.menuparent li.menuparent li.over ul,
ul.nice-menu li.menuparent li.menuparent li.menuparent li.over ul {
  display: block;
}

/* Hide sub-menus initially */
ul.nice-menu li:hover ul ul,
ul.nice-menu li:hover ul ul ul,
ul.nice-menu li:hover ul ul ul ul,
ul.nice-menu li.over ul ul,
ul.nice-menu li.over ul ul ul,
ul.nice-menu li.over ul ul ul ul {
  display: none;
}

Can you explain why you were forced to rewrite the CSS?

A little late, but...

mediaFarmer - April 23, 2007 - 17:02

Basically, nitrosx is saying:
replace this line -
$output['content'].= "<ul>";
with this line-
$output['content'].= "<ul class='submenu'>";

This adds the submenu class, which allows you to manipulate it with CSS using the example above. It works like a charm.

Problem with hyperlinks

vinny - April 24, 2006 - 16:22

I have just installed this great module, but I am having a small problem with it. Whenever the dropdown menu expands over an existing link that is part of my main content, the dropdown menu disappears. So the dropdown disppears when I put my mouse over the dropdown item that is hovering over the existing hyperlink in my main content.

Hopefully this makes sense. Can anyone give me a hint on how to fix this?

Thanks

need help

sumith - May 2, 2006 - 09:53

can u plz tell me any site where i can see how this drop down works...bez i have installed i m not finding any change even after using...plz can u help me

http://www.ukmortgageangels.c

jakeg - May 2, 2006 - 15:19

http://www.ukmortgageangels.co.uk/ uses it. Make sure to go into your blocks and turn the block on, and maybe change the block's settings to left/right/down as well.

Jake
Drupal web services, London

Centering the menus?

bran10 - May 16, 2006 - 04:51

Hey all,

Haven't had a real indepth look at it yet, but how do you go about centering the drop downs(horizontal menu dropping down)? Currently I've got it left aligned on the header block. Be good if I could have it in the middle. Obviously it's in the .css file somwhere...

- B

Centering Hortizontal Menu in header?

anner - September 14, 2006 - 16:40

I can't get my Horizontal Nice Menu to center in my header. It will float left or right fine, but when I tell it middle or center, it adds more space beneath it and floats left. Anyone got this to work?

I'm using BlueMarine theme (in 4.7). I also tried adding a center to the div tag for the header in my page.tpl.php:

<td colspan="2"><div align="center"><?php print $header ?></div></td>

with no luck.

problem with horizontal nice menu in header

navidifamily - June 11, 2006 - 06:19

hi all!
pleeease someone help us...
we work with drupal 4.6
we use spreadfirefox theme in our site &
we add a horizontal nice menu to our site with adding the following code in page.tpl.php :

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

& we don't miss our menu items but
this is our problem:
*when we add the menu in the body of our site menu opens correctly but it pushes down all the page contents!
*when we add it to the header the first submenu opens on the menu title and also the menu opens in DOWN-UP DIRECTION!!!!!

thanQ

modify the css styles

SH3RKHAN - June 27, 2006 - 11:19

change some codes in the css files
in firefox or opera (ctrl+F3) you can view all codes that pertain to the page in question
search for the css file then the style
then change some padding
that's it...
i think...

;0

:::: SH3RKHAN ::::
the ultimate one

nice work jg

SH3RKHAN - June 27, 2006 - 11:14

nice work
saved my day!

:::: SH3RKHAN ::::
the ultimate one

Exellent and easy

Ole Martin - September 26, 2006 - 21:56

I started whit Nice Menu today, and it's easy and "nice" to work whit. My site is not finish but I take one step eatch time. Soon I will start whit my template. This is a site for parents in Norway. http://foreldrekontakten.com/nasjonalt I think that my Joomlasite will be replaced whit Drupal. Drupal are so easy to work whit.

Ole Martin
http://renseri.net (joomla)
http://foreldrekontakten.com (it's Joomla still )
http://foreldrekontakten.com/nasjonalt (My first step with Drupal)

drupal 4.7.x hack??

pritisolanki - October 19, 2006 - 09:02

Hello jakeg,

I am trying your nice menu which a very good functionality for newbie like us who just started exploring drupal.Can you tell me why i am missing the secodn and third stage naviation??it just show first level and i am missing with the arrow image also.any idea what can one do?

Waiting for your positive response .

Kind regards,
Priti

Well it works fine 4.7

pritisolanki - October 20, 2006 - 07:55

Hello,

Nicemodule works fine with 4.7 also if you have created a correct navigation structure in your druapl menu then nice menu works very smooth.:-)
thanks jakeg its works perfect for me for now

Best Regards
Priti

hi

hitesh pherwani - November 3, 2006 - 12:45

hi
i m using NiceMenus....i have put contents in nice menus...when i log in and i can see the nicemenus and content in it..but when i log out and view as anonymous user i cant see nice_menus and content in that..but i have give permission to access contents and also menu..to anonymous user plz helpcan any one tell me where i have gone wrong...and also intrestingly it is coming proper in firefox and also
view source of IE

Regards,

Hitesh

Nice Menus Only Working With Blue Marine

onecreative - December 23, 2006 - 18:17

Title says it all really...

I am using Drupal 4.7.4 and latest build of Nice Menus... I would like to display a drop down menu for some primary links in the header. It seem however, that most themes (aside from blue marine) include the header in what seems to be a major content area. This really isn't effiecient by any means of developing I see... maybe for bread crumbs, but not in application of drop downs.

In my admin/block settings, I am choosing header (friends electric) to display my nice menus... and the header block is in the content area.

How do I get rid of the line under the menu

Axel_V - January 9, 2007 - 20:04

I'm using Bluemarine which draws a line under each Menu block. I didn't have a problem with it yet but since I tried out Nice menu I want to get rid of it. Can anybody help? I know it's probably a theme related issue but I don't know how to tackle this.

cheers, xl

found the solution myself

Axel_V - January 9, 2007 - 20:29

Just in case somebody has similar problems.
When overriding the stylesheet you have to override the border-bottom of the block. Something like this

#block-nice_menus-1 {
    border-bottom: 0px
  }

Changing Background/Font Colors for Top Level and Centering

averacruz - January 15, 2007 - 06:16

Greetings! Love the module so far, and just about have it configured to replace our aging Javascript version. However, since I am just beginning to dive into CSS, I was hoping someone could assist me. In the readme file, there is code listed that will allow me to remove the background color for the top-level menu items. However, I am actually wanting to simply have my top-level items have a black background with white text, while my sub-menu items should have a #CCCCCCC background color, with black text. I cannot seem to get this to work for the life of me. Every time I make a change, it seems to affect both top and sub-menu items. I know they can be controlled separately, because the code to remove the background does just that.

Secondly, like others here, I would like to center and distribute my menu items across the top of my screens full width. I've tried playing with some margin settings, but thought there might be a cleaner way.

How did you fix that

Qudsiyya - June 26, 2007 - 05:50

Hi,

I am facing the same situation. Did you find a solution to your problems?

Please share

Regards,
Qudsiyya

Just in case

sun - March 3, 2007 - 17:29

Just in case someone of you was or is in the need of a simple Administration Menu instead of a user menu: You should definitely have a look at Drupal Administration Menu.

Ted (maintainer of SimpleMenu) and I are elaborating on a module merger currently.

Daniel F. Kudwien
unleashed mind

nice_menu only works at firefox

tutube - March 8, 2007 - 21:34

I am using Drupal 5.1.

I installed and patched nice_menu, but it does not work at IE6 at all, and make my homepage look funny at IE7, all contents moved to right side of screen, I am using the original zen theme...

just tested theme nokoala (patched), the drop down menu works great.

Not working in IE 7

justinian - March 9, 2007 - 18:20

I can't get the nice menus to work in IE 7. A user can hover over the dropdown, but when they go to click on it, the dropdown disappears. Any thoughts?

I had this happen. What it

anner - March 13, 2007 - 19:58

I had this happen. What it was was that the submenus/dropdown displayed just far enough away from the parent that it was impossible to mouse from one to the other to click on something in the submenu. I had to fuss with the CSS until that space went away.

Child Links Code?

monstordh - March 11, 2007 - 16:04

I'm using custom css/code for my drop-down nav from a previous CMS site structure. However, being new to Drupal, I don't know how to tell Drupal to output the children of my primary links (I'm not that familiar with PHP yet). Can anyone help me? I just want my primary nav to output my primary menu structure ALONG WITH the children of each primary link. This will allow me to style it to work with my own drop-down menu code.

thanks!
-darren

Javascript

sajid - March 23, 2007 - 03:41

Hi Ross
I really liked your theme. Very nice and elegant design.

Just wondering if you could assist in enabling javascript in the theme.

Sajid

It works fine with frefox

moog - July 28, 2007 - 14:34

It works fine with frefox but doesn't work so well with IE. In IE the whole "li" isnt button so you can hover the expanded menu.

Also Im having another problem. The expanded menu appears behind my website design.

Janar

hi sangamreddi this module

yogitha - September 23, 2008 - 12:40

hi sangamreddi this module is really awesome thanks for your suggestion. before seeing this post i thought of writing a module for this kind of look .Nice Menu saved lot of time .

 
 

Drupal is a registered trademark of Dries Buytaert.