{% if articleContentLinkedWith is defined and articleContentLinkedWith is not empty %}
{% set articleContent = articleContentLinkedWith %}
{% else %}
{% if article.content.content is defined and article.content.content is not empty %}
{% set articleContent = article.content.content %}
{% endif %}
{% endif %}
{% if article.excerpt.categories is defined and article.excerpt.categories is not empty %}
{% set categories = article.excerpt.categories %}
{% endif %}
{% if articleContent.enterprise is defined and articleContent.enterprise is not empty %}
{% set enterprise = articleContent.enterprise %}
{% endif %}
{% if articleContent.city is defined and articleContent.city is not empty %}
{% set city = articleContent.city %}
{% endif %}
{% if articleContent.cp is defined and articleContent.cp is not empty %}
{% set cp = articleContent.cp %}
{% endif %}
{% if articleContent.offer_type is defined and articleContent.offer_type is not empty %}
{% set offer_type = articleContent.offer_type %}
{% endif %}
{% if articleContent.limit_date is defined and articleContent.limit_date is not empty %}
{% set limit_date = articleContent.limit_date %}
{% endif %}
{% if block.slider_mode is defined and block.slider_mode is not empty %}
<li class="splide__slide">
<div class="preview-container offres br8 dflex fdc">
{% else %}
<div class="preview-container offres br8 dflex fdc{% if i > 2 %} not-visible-mobile-article{% endif %}{% if i > 3 %} not-visible-tablette-article{% endif %}">
{% endif %}
<div class="preview-content">
<a href="{{ sulu_content_path(article.routePath) }}" class="cblue nodeco">
<div class="fw500 fs20 preview-h3 lh28">{{ article.title }}</div>
</a>
{% if offer_type is defined and offer_type is not empty %}
<div class="fw600 fs18 lh28">{{ offer_type }}</div>
{% endif %}
{% include "blocks/previews-from-controller/blocks/categories.html.twig" %}
<div>
{% if enterprise is defined and enterprise is not empty %}
<div class="enterprise diblock mr-24px"><img src="/resources/img/aapami/briefcase-icon.svg" alt="Entreprise" width="16" height="16">{{ enterprise }}</div>
{% endif %}
{% if city is defined and city is not empty and cp is defined and cp is not empty %}
<div class="city-cp diblock">
<img src="/resources/img/offres/pin-icon.svg" alt="Ville" width="14" height="17">
<span>{{ city ~ " " ~ cp }}</span>
</div>
{% endif %}
</div>
{% if limit_date is defined and limit_date is not empty %}
<div class="limit"><img src="/resources/img/aapami/calendar-icon.svg" alt="Date" width="21" height="20">Date limite :
{{ limit_date|format_datetime('short', 'none', locale='fr') }}</div>
{% endif %}
</div>
<div class="mta taright">
{% if article.authored is defined and article.authored is not empty %}
<span class="cgrey fs14 lh20">PubliƩ le
{{ article.authored|format_datetime('short', 'none', locale='fr') }}
</span>
{% endif %}
</div>
{% if block.slider_mode is defined and block.slider_mode is not empty %}
</div>
</li>
{% else %}
</div>
{% endif %}