{% with direction=direction|default:"horizontal" with_handle=with_handle|default:True height=height|default:"400px" %}
{% for panel in panels %}
{% if contents and forloop.counter0 < contents|length %} {% for content in contents %} {% if forloop.counter0 == forloop.parentloop.counter0 %} {{ content|safe }} {% endif %} {% endfor %} {% else %}

Painel {{ forloop.counter }}

{% endif %}
{% if not forloop.last %}
{% if with_handle %}
{% endif %}
{% endif %} {% endfor %}
{% endwith %}