{% macro section(item, currentRoute) %} {% set routePrefix = currentRoute|split('_')|slice(0, -1)|join('_') %} {% if currentRoute matches '/admin_parameter_value/' or currentRoute matches '/admin_variant_value/' or currentRoute matches '/admin_template_set/' or currentRoute matches '/admin_template_share_content/' %} {% set routePrefix = currentRoute|split('_')|slice(0, -2)|join('_') %} {% endif %} {% set isMenuOpen = false %} {% for subMenuItem in item.dto.subMenuItems %} {% if routePrefix != 'admin' and subMenuItem.dto.route starts with routePrefix %} {% if not (routePrefix == 'admin_order' and subMenuItem.dto.route matches '/admin_order_state/') %} {% set isMenuOpen = true %} {% endif %} {% endif %} {% endfor %} {# {{ dump(routePrefix, currentRoute) }}#}
{{ item.dto.label|trans({}, 'admin') }}
{% if item.dto.subMenuItems %} {% endif %}{{ item.dto.label|trans({}, 'admin') }}