{% extends '@Contao/content_element/_base.html.twig' %}
{% use '@Contao/component/_list.html.twig' %}
{% use '@Contao/component/_download.html.twig' %}

{% block content %}
    {% with {items: downloads} %}{{ block('list_component') }}{% endwith %}
{% endblock %}

{% block list_item_attributes %}
    {{- attrs(list.item_attributes|default).addClass(['download-element', "ext-#{item.file.extension(true)}"]) -}}
{% endblock %}

{% block list_item %}
    {% with {download: item} %}{{ block('download_component') }}{% endwith %}
{% endblock %}
