Views Menu Support screenshot.png

This project is not covered by Drupal’s security advisory policy.

This project contains two modules: Views Menu Support and Menu Item Reference Widget. Briefly, this is what they do:

Menu Item Reference Widget allows populating integer fields with menu item IDs, picked from select lists.

Views Menu Support provides a filter handler and a default argument plugin to Views, allowing for filtering on currently active menu item(s). This can be filtered on only the active item, the whole menu trail, or the menu trail excluding the currently active item.

What?

The functionality in Views Menu Support may seem very abstract, so here's an example of what you can do:

  • Add a new content type, "Sidebar message". Add an integer field with the Menu Item Reference Widget.
  • Build a views block listing Sidebar messages. Add a filter "MLID filtering" for your integer field, selecting "is in currently active menu item".
  • Place the block in a sidebar. On each page, all Sidebar messages matching the active menu item will be displayed.

MORE!

  • Add another integer field to Sidebar messages, labeled "Show below these pages", and with the Menu Item Reference Widget.
  • Edit the view and add another filter group (with OR condition). Add an MLID filter for the new field, selecting "is in trail, excluding current page".
  • Result: On each page, all Sidebar messages matching the active menu item (with the first field) OR any parent menu item (with the second field) will be displayed.

Confused? It's ok. Try turning on the example feature bundled with this project, and you can see what this looks like. But don't forget to place the block "Sidebar messages" in a region!

Beta1 broken!

Unfortunately, beta1 should never have been released, as it was completely broken. Please try beta2 instead.

Project information

  • caution Seeking new maintainer
    The current maintainers are looking for new people to take ownership.
  • caution No further development
    No longer developed by its maintainers.
  • chart icon137 sites report using this module
  • Created by Itangalo on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases