Posted by njivy on May 14, 2012 at 5:23am
3 followers
Jump to:
| Project: | Corolla |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
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?
<?php
/**
* 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
#1
the 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.
#2
Jeff, I don't know anything about this bug but just letting you know that current version of Menu Minipanels now supports any menus.
#3
It 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.
#4
Yes, I installed the qtip library. The minipanels work with the Bartik theme.
#5