Drupal core uses the same TWIG template for all instances of a menu. bummer.
Luckily, KristianKaa added this neat piece of code:
/**
* Implements hook_preprocess_block().
*/
function mymodule_preprocess_block(&$variables) {
$variables['content']['#attributes']['block'] = $variables['attributes']['id'];
}
- Read more about Custom TWIG templates for menus
- Log in to post comments