Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Drupal Mega Menus Made Simple

Parent Feed: 

Have you ever made a Drupal site where the design called for implementing one or more mega-menus? Have you spent countless hours downloading module after module and hacking your theme's template file to get the code to insert at just the right place?

LevelTen Interactive introduces:

Mega menus are typically a collage of multiple types of content: images, links, lists or forms all put into some type of grid or table layout. The beauty behind this module is you can configure an existing view or even create an entirely new view to display exactly what you want. Then just attach that view to an existing menu item.

By design, this module only provides basic HTML structure for inserting a view into the menu system. It does not actually style your [mega-]menu. If no styling exists in your theme or is not provided by a contributed module, the view will appear next to your menu item (which can often be a little confusing at first). It is up to the theme or contributed module to actually style the view to appear inside your menu. If the contributed theme or module implements drop down menus, using CSS or JavaScript, a new child selector (li > .view) must be included. The view can then be styled appropriately from there.

Menu Overview (shows which menu items have attached views):
Screen Shot 2012-01-13 at 8.50.23 AM.png

Menu Item Edit (adds the "Attach view" fieldset for choosing a view):
Screen Shot 2012-01-13 at 8.51.00 AM.png


Get Drupal help when you need it most! Find hundreds of great tutorials. Track, rate, comment and more. Create Account
Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web