Mega Drop-down in Drupal, is it doable in Seven?
I love the look and feel of mega drop-down menus, but the Drupal menu system does not have an interface that facilitates grouping of links within menus, and it's even more difficult to throw HMTL into the menu that isn't part of the list of links.
I would love to be able to have a primary menu like this: http://demo.yootheme.com/ without having to create a handcoded php-block or having to resort to a custom module that pulls views into menu containers. Is it possible in Drupal 7, or does anyone have a bright idea that makes this doable?





Comments
Submitted by budda on Mon, 03/01/2010 - 13:39
Could it not be generically completed using some Javascript thats triggered with a menu class or 'rel' attribute, to load a View or load another menu block on hover?
No way to do it out of the box at least.
Submitted by Jeff Geerling on Mon, 03/01/2010 - 15:23
I gave up on using Drupal's menu system for my mega menus on http://archstl.org/, and instead elected to simply use a PHP include file in my template with markup I generated myself.
I know some people are working on a module to enable mega menus using menu blocks... but that still seems a little hackish to me.
Submitted by JurriaanRoelofs on Mon, 03/01/2010 - 23:37
wow great menu man! Except for that the first submenu is way overcrowded!
Submitted by Nick_vh on Mon, 03/01/2010 - 20:44
I am sure it is doable (look at www.thewhitehouse.gov) but I don't have any idea with what they did it.
It seems to me that a trivial little module could do this?
Submitted by JurriaanRoelofs on Mon, 03/01/2010 - 23:41
Thanks! Thats not really the type of menu I mean because it does not use grouping, it's just a single list that's split up in 2 columns. This is actually really easy to achieve by styling the menu items something like this:
ul.menu {
width:300px;
}
ul.menu li {
float:left;
width:50%;
}
I will consider doing that in one of my next themes, it would be a nice warm-up for mega drop-downs.
Submitted by Drupal Theme Garden on Tue, 03/02/2010 - 12:38
Those drop-downs looks just great. It would be really nice to see something like that in D7.
Submitted by Ryan Price on Tue, 03/02/2010 - 14:33
Really seems like module territory to me. There are too many ways to create these mega menus, if you ask me, to easily parameterize it. Image uploads, CSS, extra text,etc. I've seen people using regions and mini panels to achieve this in the past. We have modules for exactly this reason: extending Drupal.
Just make sure we get some working code out there in the wild, and we can get it in Drupal 8!
Submitted by JurriaanRoelofs on Tue, 03/02/2010 - 15:48
Good point, the content of a megadropdown is not defined in any standard and it can be anything.... text, links, images, forms even! Even for a module it would be difficult to handle the full spectrum of content that can go in a dropdown, however it is not so difficult to achieve the most popular usage: grouping in menus.
The first module should be able to load this DOM structure using the Drupal menu system:
ul li a ul li ul li a li a li a ul li a li a li a ul li a li a li aSo you have a first level menu, and the dropdown is basically a list of other menus.
Submitted by Anonymous on Tue, 04/20/2010 - 23:20
I am glad that people are stepping up and doing something about it.
tactical pants
Submitted by Mark Carver on Tue, 01/17/2012 - 16:31
"having to resort to a custom module that pulls views into menu containers"
Well that's exactly what the http://drupal.org/project/menu_views module now does. There are a few modules out there that really attempt to make mega menus simple, but their UI's are completely cluttered. We designed this module to give the admin the power to configure ANY view in ANY menu item. Once the markup is there, then your theme can style it however it wants :)
Submitted by JurriaanRoelofs on Fri, 01/20/2012 - 12:19
I saw that in Drupal Planet I think. Awesome work guys!
Would love to see more showcases in your project page (that aren't Bartik)
Add new comment