{% set file_references = file_references | selectattr('file', 'public') | list %}
{% if file_references | length > 0 %}
    <section id="media">
        <h2>
            {% trans %}Media{% endtrans %}
            {% with url = page_resource | localized_url ~ '#media'%}
                {% include 'permalink.html.j2' %}
            {% endwith %}
        </h2>
        {% with entities = file_references %}
            {% include 'entity/list--file-reference.html.j2' %}
        {% endwith %}
    </section>
{% endif %}