{% set article = sulu_content_load(id) %}
{% if article.author is defined and article.author is not empty and
article.author.contact is defined and article.author.contact is not empty %}
{% set author = sulu_resolve_user(article.author).contact.fullName %}
{% endif %}
{% if article.content is defined and article.content is not empty %}
{% set articleContent = article.content %}
{% endif %}
{% if article.extension.excerpt.categories is defined and article.extension.excerpt.categories is not empty %}
{% set categories = article.extension.excerpt.categories %}
{% endif %}
{% if articleContent.chapo is defined and articleContent.chapo is not empty %}
{% set chapo = articleContent.chapo %}
{% endif %}
{% if articleContent.routePath is defined and articleContent.routePath is not empty %}
{% set routePath = articleContent.routePath %}
{% endif %}
{% if articleContent.title is defined and articleContent.title is not empty %}
{% set title = articleContent.title %}
{% endif %}
{% if articleContent.front_title is defined and articleContent.front_title is not empty %}
{% set title = articleContent.front_title %}
{% endif %}
{% if gt_first is defined and gt_first is not empty and article.template is defined and article.template is not empty and article.template == "groupe-travail" %}
{% set introGtEnable = "team-project-section" %}
{% else %}
{% set introGtEnable = "" %}
{% endif %}
{% if article.template is defined and article.template is not empty %}
<div class="preview-container {{ article.template }} br8 dflex fdc {{ introGtEnable }}"
{% if article.content is defined and article.content.title is defined %}
data-title="{{article.content.title}}"
{% endif %}
>
{% if article.template == "articles" or article.template == "analyses" or article.template == "guides_outils" %}
{% include "api/blocks/articles-preview-content.html.twig" %}
{% elseif article.template == "agenda" %}
{% include "api/blocks/agenda-preview-content.html.twig" %}
{% elseif article.template == "newsletters" %}
{% include "api/blocks/newsletters-preview-content.html.twig" %}
{% elseif article.template == "offres" %}
{% include "api/blocks/offres-preview-content.html.twig" %}
{% elseif article.template == "aapami" %}
{% include "api/blocks/aapami-preview-content.html.twig" %}
{% elseif article.template == "fiches_territoires" %}
{% include "api/blocks/territoire-preview-content.html.twig" %}
{% elseif article.template == "experiences" %}
{% include "api/blocks/experience-map-preview.html.twig" %}
{% elseif article.template == "groupe-travail" %}
{% include "api/blocks/groupe-travail-preview-content.html.twig" %}
{% endif %}
</div>
{% endif %}