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.
I don't think this is the same issue #1314210: Сompatibility with Menu Minipanels module.
Minipanels should appear when hovering over a menu item, but they don't, even when I have implemented your hook_page_alter() fix.
The rendered menu contains <a ... class="menu-minipanel menu-minipanel-1159">
.
I haven't wrapped my mind around the issue yet, but this section in menu_minipanels.module might be relevant.
Would you add support for menu_minipanels in Corolla 7.x-3.x?
/**
* Implements hook_theme_registry_alter().
*
* Theme preprocess functions aren't called if the theme is in a function.
*
* This hacks a preprocess function for theme_menu_link in a way that
* won't interfere with other themes or modules that override
* theme_menu_link.
*
* theme_menu_link is overriddeden because to print menus, themes and
* modules generally use menu_tree_output, and menu_tree_output calls
* theme_menu_link.
*
* This method *only* works if theme_menu_link is called *before*
* $closure is created in page_preprocess.
*
* If a theme calls theme('menu_tree') in a page.tpl.php for instance, this
* will not work.
*
* To get it to work, the theme will need to implement page_preprocess hook
* and add a variable to $vars, so that the theme_menu_link is called
* *before* $closure.
*/
function menu_minipanels_theme_registry_alter(&$vars) {
$vars['link']['old function'] = $vars['link']['function'];
$vars['link']['function'] = 'menu_minipanels__preprocess_link';
}
Comments
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedthe hook_page_alter() is only required if you want to use the menu mini panel with a menu that is not supported by the module, which only supports core menus (the ones that ship with Drupal core).
Did you install the qtip library?
I am installing this to run some tests, I havent played with the module for a while.
Comment #2
Stan Turyn CreditAttribution: Stan Turyn commentedJeff, I don't know anything about this bug but just letting you know that current version of Menu Minipanels now supports any menus.
Comment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedIt does, well that's fantastic news! No more hook_page_alter() required, that's great.
Still need to test, I have it installed but haven't had time today to test.
Comment #4
njivy CreditAttribution: njivy commentedYes, I installed the qtip library. The minipanels work with the Bartik theme.
Comment #5
njivy CreditAttribution: njivy commented