| Drupal
How to Create a Menu Block in Drupal 8

An OSTraining member asked us how to display a menu with more than one level in Drupal.

In Drupal 7, you could do this by using the Menu block module or by using a theme that had added support for more complex menus.

However, in Drupal 8, the Menu block module has been moved to the core. Here's how it works ...

  • In Drupal 8, go to Structure > Block layout.
  • Select "Place block".
  • Scroll down till you find "Main Navigation" or the menu you want to use and select "Place block".
Placing the block in Block layouts

Here you can decide if you want the title of the block to be on display and set the visability options for the block.

Note that you must choose which content types this will be displayed on if you do not tick any of these content types the menu will not appear.

  • Select "Menu Levels" and choose the level of menu you want to be displayed on this site.
Configuring the block

Now you should see the menu displayed in the sidebar region of your Drupal site on all of your basic pages.



About the author

Daniel is a web designer from UK, who's a friendly and helpful part of the support team here at OSTraining.