Allows menu items to render views instead of links. This is useful for creating "mega-menus".
What Menu Views Does
Menu Views is a utility module. It provides back end support for replacing a standard menu item link with a menu item view. Menu items (in any menu) now have the option of toggling between two different menu item types: link or view. Depending on which option is selected, the appropriate configuration form is displayed on the admin side and the appropriate type of item is rendered on the front-end.
What Menu Views Does NOT Do
Menu Views is NOT a theming/styling module for mega-menus. As stated above, this module is strictly a utility module for replacing menu item link with a view. Once the HTML markup is there, Menu View's job is done! Read #1794010: Menu Views is not working.
Theme Integration
Depending on how a theme renders the primary and secondary navigation, this module may not work because the parent items may not ever be extended (regardless whether they are checked as such in the menu item).
It is strongly recommended to use one of the following modules in your theme's menu region instead (see: Use menus in Drupal 7? You need Menu block module.).
Additionally, this module overrides core's default theme_menu_link() implementation (to replace the menu link with a view) by intercepting and replacing the registered function via hook_theme_registry_alter().
Due to the nature of how Drupal's theme system work, a theme may not be compatible out-of-the-box with this module if it implements its own menu_link
or hook_theme_registry_alter() implementations.
You may need to create a sub-theme and implement the following in its template.php
file (see #1908910: View links are not displayed (rendered) in menu):
/**
* Implements hook_theme_registry_alter().
*
* {@inheritdoc}
*
* Supports the Menu Views module.
*
* Because Menu Views is a module, its alter hooks are executed before any
* theme alter hooks are. If a theme alters the theme registry (such as a
* popular base theme like Bootstrap), it can potentially replace everything
* that Menu Views already did.
*
* If Menu Views does not work with a theme, then add the following to your
* sub-theme so it will rerun Menu View's theme registry alters.
*
* Replace THEMENAME with the machine name of your sub-theme.
*
* @see https://www.drupal.org/node/1908910
*/
function THEMENAME_theme_registry_alter(&$registry) {
// Re-run Menu View's theme registry alters.
if (function_exists('menu_views_theme_registry_alter')) {
menu_views_theme_registry_alter($registry);
}
}
Module Integration
- Menu Block
- Nice Menus
- Superfish (requires the 7.x-1.9-beta5 release or greater)
Useful Modules
- Views Field View - Allows the embedding of a view as a field inside a view.
- Semantic Views - Reduced or alter the HTML markup of a view.
- Menu Expanded - Reverts the changes made in #564886: Remove 'expanded' checkbox from menu item overview
Features
- Permissions - Admins have the ability to grant select users with the ability to create or configure menu view items.
- Breadcrumb Configuration - Display and configure the menu item's breadcrumb title and link.
- Title Configuration - Display and configure the view's title.
- Tokens - Pass tokens to the view's arguments or title. Use tokens in the menu item's breadcrumb title or path.
Documentation:
Here are some articles that discuss mega-menus and Menu Views:
- Improving Menu Views in Drupal 7 to Create Mega Menus More Efficiently
- Drupal Mega Menus Made Simple
- Revisited: Mega Menus in Drupal 7
- Use menus in Drupal 7? You need Menu block module.
Common Mistakes
Below is a list of issues that have already been filed and answered:
- #1913794: Menu items only showing <view> vs. items from view
- #1794010: Menu Views is not working
- #1821904: Menu Views always expanded
- #1765148: Multiple views on one menu item
- #1455414: Duplicate Module?
- #1631578: Doesn't work with Views caching?
- #1569154: Menu Views and locale/translation module with path prefix
- #1908910: View links are not displayed (rendered) in menu
Known Issues
Below are known issues and have already been addressed, please do no re-open if closed.
Project information
- Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projects - Obsolete
Use of this project is deprecated. - Module categories: Administration Tools, Content Display, Site Structure
- 3,703 sites report using this module
- Created by markhalliwell on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 7.x-2.x-dev updated 25 Jan 2018 at 23:03 UTC