{% extends 'base.html.j2' %}
{% set page_title = document.resource.label | localize %}
{% set document = document.copy(entity_contexts=document.entity_contexts(document.resource)) %}
{% do document.breadcrumbs.append(
    document.resource.plugin().label_plural | localize,
    document.resource.plugin() if document.resource.plugin().id in project.entity_types and project.entity_types[document.resource.plugin().id].generate_html_list else none
) %}
{% do document.breadcrumbs.append(
    page_title,
    document.resource
) %}
{% block page_content %}
    {% set regional_content = project.extensions['raspberry-mint'].regional_content %}
    {% if 'entity-page-content--' ~ document.resource.plugin().id in regional_content %}
        {{ regional_content['entity-page-content--' ~ document.resource.plugin().id] | build_content }}
    {% elif 'entity-page-content' in regional_content %}
        {{ regional_content['entity-page-content'] | build_content }}
    {% endif %}
{% endblock %}
