diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 9fbca9e..3a45040 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2390,7 +2390,7 @@ function drupal_common_theme() { ), // From menu.inc. 'menu' => array( - 'variables' => array('items' => array()), + 'variables' => array('items' => array(), 'attributes' => []), 'template' => 'menu', ), 'menu_local_task' => array( diff --git a/core/modules/system/templates/menu.html.twig b/core/modules/system/templates/menu.html.twig index 528f9d7..f24a8bba 100644 --- a/core/modules/system/templates/menu.html.twig +++ b/core/modules/system/templates/menu.html.twig @@ -21,9 +21,9 @@ {#We call a macro which calls itself to render the full tree. @see http://twig.sensiolabs.org/doc/tags/macro.html #} -{{ menus.menu_links(items, 0) }} +{{ menus.menu_links(items, attributes, 0) }} -{% macro menu_links(items, menu_level) %} +{% macro menu_links(items, attributes, menu_level) %} {% import _self as menus %} {% if items %} {% if menu_level == 0 %} @@ -35,7 +35,7 @@ {{ link_from_url(item.title, item.url) }} {% if item.below %} - {{ menus.menu_links(item.below, menu_level + 1) }} + {{ menus.menu_links(item.below, attributes, menu_level + 1) }} {% endif %} {% endfor %}