According to John Albin Wilkins in this lullabot podcast, it is possible to use D7's render elements to create a mega menu [the relevant discussion starts at 12:08]

http://www.lullabot.com/podcasts/drupal-voices-159-john-albin-wilkins-on...

While not an issue for Megamenu v.6, it might play a role if moving this project to D7.

Grimfandango

Comments

johnalbin’s picture

Title: Theoretically easier in D7 to create mega-menus » Re-architect module in Drupal 7
Version: 6.x-1.x-dev » 7.x-1.x-dev
Component: Miscellaneous » Code
Category: feature » task
Priority: Minor » Major
Status: Postponed » Needs review

Given these issues…

I spent a couple hours evaluating the existing module, and it appears that this module would need to be completely re-architected to support those features in a sane manner.

Between now and Drupalcon, I'm going to work on writing a d7 mega menu module from scratch based on numerous code snippets I have on existing sites. I'm willing to collaborate rather then just create a new project, but I don't know the interest on your end.

Here's sketch of how the configuration of a mega menu would work.

  1. Block configuration:
    1. menu name
    2. menu depth (defaults to 2)
    3. admin title
    4. machine name
  2. Each menu item in the primary level menu link needs its own configuration as well:
    1. # of columns to split child menu links into
    2. layout (pluggable layouts with multi-column as the default)
    3. menu slice positioning within layout
    4. embedded block positioning within layout

There's also the possibility that it would need to leverage the API of the menu_block module. Which means menu_block would become a dependency.

Obviously, this is big departure from the existing code base. If you'd like to collaborate, great! You can also hold off on deciding until after I have some code for you to review.

Anonymous’s picture

Yes, we would like to re-architect the module for 7.x-2.x branch to accommodate those requests. My first priority is getting the 6.x release out. Both 6.x and 7.x-1.x are going to stay pretty much where they are at feature wise, just patching up the bugs and bringing them to a stable point. But here on out, we want to re-evaluate the direction of the module, and launch a new 7.x branch going forward.

So, we are wide open for suggestions and welcome your collaboration!

We should get together at Druplacon. Unfortunately, erykmynn won't be there but myself and lobo235 will. So, we ought to be able to make some headway planning it out.

bryancasler’s picture

subscribe

johnalbin’s picture

Title: Re-architect module in Drupal 7 » Re-architect module in Drupal 7.x-2.x branch

Just talked to Andrew via email. I'll start working on the new code in a 7.x-2.x branch.

johnalbin’s picture

So, who wants to give me CVS access? :-)

sylv3st3r’s picture

Just exactly what I wanted for 7.2x
Tell me if you need some extra hand

Anonymous’s picture

Hey John, I've notified erykmynn to grant you access.... Just waiting on him.

erykmynn’s picture

John you have access now! Thanks for collaborating.

Also, I've given filmknurd rights to administer maintainers.

frank pfabigan’s picture

subscribing

KirstenLangholz’s picture

Hello,

I am very interested in the development for the 7.x-2.x branch of this module.
Unfortunately I cannot code, but if you need an early tester - count me in.

Kirsten

Tim Jones Toronto’s picture

Title: Re-architect megamenu module in Drupal 7.x-2.x branch » Re-architect module in Drupal 7.x-2.x branch

Hi, still testing 7.x.1 version and be happy to test 7.x.2 branch.

I am specifically looking at drop down menus for D7 using multiple sites using the excellent Domain Access Module – and creating workarounds using Taxonomy Menu to generate menu items against different site names. This populates the menus.
So far I have a crude working solution in the dynamic naming of the menu item tree based on site domain. The following example is an overview that would be in module:

$_domain = domain_get_domain();
$menudomain = 'menu-' . str_replace('.', '-', ($_domain['subdomain']));

Then, get menu tree based on $menudomain variable.

(You have to name your menus as:. www-yoursite1-com , www-yoursite2-com to match etc.)

Crude, but works :)

A simple checkbox in the configuration form could be set up to include Domain Access functionality which would be the only module tested to work on D7 with independent menus on a per domain basis.

Hope this might be useful in future.

Tim

Shadlington’s picture

Did this go anywhere? I can't see any indication that JohnAlbin did work on this at all... Is there maybe a separate sandbox where this might have gone on?

Anonymous’s picture

John is a busy guy. At Drupalcon, he didn't think he'd get started on this for a few months.

Shadlington’s picture

I didn't mean to sound demanding, I just wanted to be sure I wasn't missing anything. Thank you :)

geek-merlin’s picture

Title: Re-architect module in Drupal 7.x-2.x branch » Re-architect megamenu module in Drupal 7.x-2.x branch

subsub!

rickyrocks’s picture

Hi !
I was using this amazing module MEGAMENU with drupal 6 as my primary menu and was trying to use it with drupal 7 . I used same code and it does not seem to be working. how should it be called from acquia marina page.tpl.php to use it as primary menu in drupal 7?

This is the code i am using with d6 and i am using acquia marina theme.

   $megamenu = module_invoke('megamenu', 'block', 'view', 0);
   print $megamenu['content'];

Regards

sylv3st3r’s picture

Just create a block on your page.tpl.php, example:

<?php if ($page['main_menu']) print render($page['main_menu']); ?>

Assign megamenu on your "main_menu" block

That being said that if you use my ported D7 version. Not 7.2-dev

duaelfr’s picture

Title: Re-architect module in Drupal 7.x-2.x branch » Re-architect megamenu module in Drupal 7.x-2.x branch

I am really interested in this 7.x-2.x version but the Git branch looks untouched since Feb 25
Is this always planned ? Is there something I can do to help ?

bryancasler’s picture

In the meantime I'm looking to this module for my megamenu needs http://drupal.org/project/menu_minipanels

Haven't used it yet, but about to give it a go.

duaelfr’s picture

Panels is a great module but also a huge one, required by menu_minipanels.
If you do not use it for your whole website, I think it is a bit too expensive to load it just for your menu.

My 2 cents

bryancasler’s picture

I'm using panels everywhere so I'm already neck deep in panels :)

SophieG’s picture

Could anyone tell me where to find the 7.x-2.x branch ?

thanks

duaelfr’s picture

The 7.x-2.x branch is currently empty. You can see it on git.

SophieG’s picture

ok thanks

alibama’s picture

I'm not able to get both megamenu and menu minipanels working together - it's one or the other.... any suggestions appreciated

ram4nd’s picture

Issue summary: View changes
Status: Needs review » Closed (works as designed)

As I am the new maintainer. I will take a bit of a new approach. I will try to get the 1.x to a stable release and 2.x will be a complete rewrite hopefully with a frontend colleague, we will develop something nice.