Views build menu

Last updated on
30 April 2025
  1. Enable the Views Build Menu module like any other, then create a new node view.
  2. Add a new display to your view, of type 'Menu items'
    VBM-1.png
  3. Add three fields to your view:
    1. A Node: nid field
    2. A Node: Title field
    3. Another Node: nid field
    4. We'll use the first nid field for the unique id that Views build menu needs, and the second as the URL for the menu items. The title field will be used as the menu item title, though we need to set that up.
      For the second Node: nid field, you'll want to rewrite the field so that views renders it as a URL, thus:
      VBM -2.png

  4. Now we'll want to edit the style options to assign the correct fields to be used in the correct places, thus:
    VBM - 3.png
  5. Now you can choose the parent menu item, and the depth to which VBM should be allowed to create menu items (1 is good here unless you really know what you're doing). These options are found in the 'Built menu' section of the display form.
  6. Refine your view to just return the nodes you want, and note that it will respect any paging options you set. So you may wish to turn paging off, and set the number of items to show to 'unlimited'.
  7. Save your view.
  8. If all has gone well, you should be able to either wait for cron to execute your view and create the menu items, or you can go to /admin/reports/views_periodic_execution and execute your view manaully.

Help improve this page

Page status: Not set

You can: