{% macro menu_entry(entry) -%} {% set event_locked = entry.event_new.is_locked %}
{% if config.DEBUG %}{{ entry.position + 1}}{% endif %} {{ entry.localized_title }} {% if entry.type.name == 'page' %} {% endif %} {% if not entry.is_separator %} {% endif %} {% if entry.type.name in ('user_link', 'page', 'separator') %} {% endif %}
{% if entry.is_root and entry.children %} {{ menu_entries(entry.children, connect_menu=entry.type.name in ('user_link', 'page')) }} {% elif entry.type.name in ('user_link', 'page') %} {{ menu_entries([], connect_menu=true) }} {% endif %}
{%- endmacro %} {% macro menu_entries(entries, connect_menu=False) -%} {# empty class as the :empty pseudo selector fails if there are white spaces, \t or \n between the