{% for item in items %} {{ item.title }} {% if item.items %} {% include "tests/dummy_nav.html" with items=item.items %} {% endif %} {% endfor %}