Drupal View: shows teasers of all menu children for current node

I tossed around a lot of strategies for accomplishing this, and in the end I managed to find a module that does most of the hard work for me.

Goal

To create a node which displays the teasers of all its menu children (other nodes nested under current node's menu entry).

What you'll need

Here's the strategy

  • Create a new node type called "Overview Page"
  • Create a new view (that aggregates nodes) and name it something like "overview_pages"
  • Add a new views display of type "Node content"
  • Under "Node content settings" set Node types: Overview Page, Build modes: Full node, Arguments:Use the ID of the node the view is attached to
  • Add the "Menu: Node id" argument with the following settings: Action to take if argument is not present: Provide default argument Default argument type: Node ID from URL Depth: 1
  • Add a few fields. I'd recommend "Title" at least
  • You should also add a published:yes filter
  • Create a new Overview page. Make a menu entry for it. Place a few other menu entries under it.

Voila! Each time that you create an overview page, it will automatically display an attached view of the current node's menu children. Pretty cool.

Create a new node type called "Overview Page"
Create a new view (that aggregates nodes) and name it something like "overview_pages"
Add a new views display of type "Node content"
Under "Node content settings" set Node types: Overview Page, Build modes: Full node, Arguments:Use the ID of the node the view is attached to
Add the "Menu: Node id" argument with the following settings: Action to take if argument is not present: Provide default argument Default argument type: Node ID from URL Depth: 1
Add a few fields. I'd recommend "Title" at least
You should also add a published:yes filter
Create a new Overview page. Make a menu entry for it. Place a few other menu entries under it.

If you want the children to display in the same order as the menu, you need to set the following sort criteria in order:
- Menu: Weight (asc)
- Content: Title (asc)

Hey @madmatter23
Noob here...
i'm trying to accomplish what you're doing, but in drupal 7... can’t seem to get it right though.
could you please, do a quick guide, on how to do it 7?

This helped me accomplish what I wanted. After searching many modules and half-baked ideas in forum threads, this is the first one that worked as expected. ;)

I successfully created menu links on a parent page but that isn't what I want. I need those child links to show a list after hovering the mouse on the parent menu such that you can easily click your choice of child menu link. Any ideas?

"Menu: Node id" -- saved me from struggling anymore with "Menu: Parent".

Cheers!

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.