In Drupal 8, how can I render a menu links children without checking 'expanded' on the menu link? I am building a drop down that displays on hover, the links need to render.
My code so far:
{% macro menu_links(items, attributes, menu_level) %}
{% import _self as menus %}
{% if items %}
<ul>
{% for item in items %}
{% if menu_level == 0 %}
{%
set classes = [
'global-top__utility-item',
'js-utility-item',
item.in_active_trail ? 'active-trail',
item.below ? 'has-submenu'
]
%}
{% endif %}
<li{{ item.attributes.addClass(classes) }}>
{{ link(item.title, item.url) }}
{% if item.below %}
{{ menus.menu_links(item.below, attributes, menu_level + 1) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
When a parent link has children, they are not rendering unless 'expanded' is checked, which breaks the menu.