{% for subalbum in menu_album.albums %}
{% with current_ancestor=(
album.breadcrumb|length
and depth < album.breadcrumb|length
and subalbum.title == album.breadcrumb[depth][1]
) %}
{{ subalbum.title }}
{% if current_ancestor %}
{% with menu_album=subalbum, depth=depth+1 %}
{% include './menu.html' %}
{% endwith %}
{% endif %}
{% endwith %}
{% endfor %}