Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello and thanks for the module!
I would like to use this with a custom menu tree that is built dynamically rather than from the Drupal menu subsystem. I have been doing a similar thing with nice menus which supports this kind of use case.
It would just take a little refactoring of megamenu_theme_menu_tree() so that the tree structure and display options are passed as arguments. Patch to follow...
Andy
Comment | File | Size | Author |
---|---|---|---|
#1 | megamenu-928538.patch | 3.48 KB | chaps2 |
Comments
Comment #1
chaps2 CreditAttribution: chaps2 commentedPatch as promised. This is against HEAD.
It just adds a new function megamenu_theme_menu() as below:
One thing to make sure of is that the links in the menu tree structure include 'link_title' and 'link_path' attributes. I think nice menus uses the 'title' and 'href' attributes.
Comment #2
chaps2 CreditAttribution: chaps2 commentedComment #3
vlooivlerke CreditAttribution: vlooivlerke commentedHi I tried this patch but did not see a list with my custom menu tree.
I can call my menu via the theme template the same way I call all other drupal menus.
Here I add a
<span>
class to itWill It not be possible to set non drupal menus as mega-menus by simply entering the [menu_name] in a field and save to edit megamenu settings.