menu_is_visible

Filters a list of menu items on visibility. The is_visible filter can’t be used due to the structure of a menu item list.

Example:

{% with m.rsc.main_menu.menu|menu_is_visible as menu %}
        {% if menu %}
        <ul>
                {% for item in menu %}
                        <li>{{ item.id.title }}</li>
                {% endfor %}
        </ul>
        {% endif %}
{% endwith %}

Edit on GitHub

menu_flat Menu menu_expand

Referred by

Filters

Filters transform template variables before they are rendered.