When trying to use a menu views menu in the foundation theme, all that happends is it renders out <a href="/%3Cview%3E" title=""></a>
It's seems there is presently no way for foundation to actually render out the view instead of rendering a simple link.
We're pretty urgently seeking this feature, but i'm not deeply into the codebase of ehiter menu_views or foundation, so i don't know how to implement it.
I'm thinking it should be added into _zurb_foundation_render_link, because where is already a case for special_menu_items?
Comments
Comment #1
ropic commentedSame problem, any fix ?
Comment #2
zonesny commentedI'm scratching at the surface of this compatibility issue as well. In a quest for mega menus that work with Foundation, I've tested a number of modules. In addition to Menu Views module, I've installed the Ultimenu module, which will let you embed a "view block" inside a menu (the module is a bit clunky, but it works). However, I'm using the "tab bar" in my Foundation subtheme, which presents multi-level submenus vertically in the off-canvas section. At the moment, the view block is not being displayed in the off-canvas section, which makes sense, but leads me to ask those of you who have used this menu views before, what should actually be shown in the off-canvas submenu?
Comment #3
zonesny commentedI found a solution in this thread about Bootstrap module (credit to rroblik's original comment). The function theme_zurb_foundation_menu_link() (i.e. theme_menu_link) overrides Menu View's menu_views_menu_link(). Here is the code that goes in zurb_foundation's template.php:
While these changes will get menu_views working, it's not a great solution. I hate the idea of replicating code (i.e. code smell). Feel free to alter/refactor.
Comment #4
hongpong commentedThank you zonesny for that workaround. I think we are not in a position to alter the function theme_zurb_foundation_menu_link to make it work with menu_views and I agree this would be a bad code smell because it is duplicative.
see also https://www.drupal.org/project/menu_block and http://palantir.net/blog/use-menus-drupal-7-you-need-menu-block-module for additional options. If there is a patch to call the function on the menu_view this ticket can be reopened, but it is unlikely that the function will otherwise get changed in 7.x-5.x.