I am trying to combine Advanced Menu's submenu module with the superfish module.

So far I have managed to do it by overriding the theme_superfish function and calling an alter function right after the menu has been loaded with menu_tree_all_data(), but I would much rather avoid overridding the whole theme function.

Therefore I'm proposing a drupal_alter call in the theme_superfish function right after the menu has been loaded.

I will upload a patch that demonstrates the change.

Let me know if you'd like to see more about how I use this hook..

CommentFileSizeAuthor
#1 add_hook_to_alter_menu-2445841-0.patch385 bytesprinds
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

prinds’s picture

Rudi Teschner’s picture

The advanced_menu_submenu module intends to integrate superfish, but it seems that aint working at all lately.
advanced_menu_submenu even causes an fatal error with superfish 2.x since the superfish_contents function used in advanced_menu_submenu_block_view_alter has not been included in the superfish 2.x branch.

Shouldnt this issue be adressed in the advanced_menu project instead? What could be causing this beheaviour?

Couldnt it suffice to change the order in which both modules alter the menu? At the moment it seems that superfish goes first and advanced_menu_submenu cant handle the result.

Nigel Cunningham’s picture

Status: Active » Reviewed & tested by the community

I've just done the same thing. The problem is that advanced_menu can't replace the placeholder menu without the hook - if we attempt to do so in the 2 hooks Superfish does provide, it's too late in the game and the classes etc that should be there aren't there.

Given that I've come up with exactly the same solution, I'll mark this as RTBC.

  • mehrpadin committed db5967f on 7.x-1.x authored by prinds
    Issue #2445841 by prinds: Add hook to alter menu items
    
mehrpadin’s picture

Status: Reviewed & tested by the community » Fixed

Hey,

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.