Blog Archives

Adding Level Number Class to Menu Items in Drupal 8

This is a quick post showing how to add level classes to menu items in Drupal 8. Here’s the result, showing the additional menu--level-N  and menu-item--level-N  classes: Step 1: Create a New Twig template File Determine which Twig template you need to

Tagged with: , ,
Posted in Development

Rebuilding the Drupal Navigation Menu (Automatically)

The following steps will get you a completely rebuilt Navigation menu. Clear your cache Backup your database In the database, remove any records in {menu_links} where menu_name = navigation Create a file somewhere in your site’s directory structure Add this

Tagged with: , , ,
Posted in Development