You are here

README.txt in Views Menu Support 7

Same filename and directory in other branches
  1. 8 README.txt
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!

File

README.txt
View source
  1. This project contains two modules: Views Menu Support and Menu Item Reference
  2. Widget. Briefly, this is what they do:
  3. Menu Item Reference Widget allows populating integer fields with menu item IDs,
  4. picked from select lists.
  5. Views Menu Support provides a filter handler and a default argument plugin to
  6. Views, allowing for filtering on currently active menu item(s). This can be
  7. filtered on only the active item, the whole menu trail, or the menu trail
  8. excluding the currently active item.
  9. ## What?
  10. The functionality in Views Menu Support may seem very abstract, so here's an
  11. example of what you can do:
  12. * Add a new content type, "Sidebar message". Add an integer field with the Menu
  13. Item Reference Widget.
  14. * Build a views block listing Sidebar messages. Add a filter "MLID filtering"
  15. for your integer field, selecting "is in currently active menu item".
  16. * Place the block in a sidebar. On each page, all Sidebar messages matching the
  17. active menu item will be displayed.
  18. MORE!
  19. * Add another integer field to Sidebar messages, labeled "Show below these
  20. pages", and with the Menu Item Reference Widget.
  21. * Edit the view and add another filter group (with OR condition). Add an MLID
  22. filter for the new field, selecting "is in trail, excluding current page".
  23. * Result: On each page, all Sidebar messages matching the active menu item (with
  24. the first field) OR any parent menu item (with the second field) will be
  25. displayed.
  26. Confused? It's ok. Try turning on the example feature bundled with this project,
  27. and you can see what this looks like. But don't forget to place the block
  28. "Sidebar messages" in a region!