{% macro menu_entry(entry) -%}
{% set event_locked = entry.event.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
tags #}
{%- for entry in entries if not entry.is_orphaned %}
{{- menu_entry(entry) -}}
{% endfor -%}
{%- endmacro %}
{% macro menu_entry_display(entry, root_entry=true, active_entry_id=none) %}
{%- if entry.is_separator -%}
{%- else -%}
{% set menu_class = 'menuConfTitle' if root_entry else 'menuConfMiddleCell' %}