Download & Extend

Views Menu Support

Views Menu Support screenshot.png

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!

Downloads

Version Downloads Date Links
7.x-1.x-dev tar.gz (14.46 KB) | zip (18.82 KB) 2012-Mar-23 Notes

Project Information


Maintainers for Views Menu Support

  • Itangalo - 20 commits
    last: 9 weeks ago, first: 48 weeks ago
  • geekyMoa - 3 commits
    last: 45 weeks ago, first: 46 weeks ago

Issues for Views Menu Support

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
nobody click here