{% block navigation %} menu {% for title, mapping in bag("navigation").items() %} {% if mapping.visible|default(true) %} {%if not mapping.list_childs %} {{ title }} {% elif mapping.list_childs %} {{ title }} {{ title }} {% set sub_menu = mapping['items'].items() %} {% for sub_title, href in sub_menu %} {{ sub_title }} {% if sub_title == 'Blog' or sub_title == 'Podcast' %} {% set children = site.get(href).children %} {% for child in children %} {% if loop.index <= 3 %} {{ child.title }} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endif %} {% endif %} {% endfor %}
menu