{% set position_texte = "" %}
{% if widget.positiontext == 0 %}
{% set position_texte = "pos1" %}
{% elseif widget.positiontext == 1 %}
{% set position_texte = "pos2" %}
{% else %}
{% set position_texte = "pos3" %}
{% endif %}
{% set type_affiche = "" %}
{% if widget.nombrearticle == 0 %}
{% set type_affiche = "type_affiche1" %}
{% elseif widget.nombrearticle == 1 %}
{% set type_affiche = "type_affiche2" %}
{% else %}
{% set type_affiche = "type_affiche3" %}
{% endif %}
{% if widget.actif_slider == 1 %}
{% set type_affiche = type_affiche ~ " owl-carousel" %}
{% endif %}
<section class="sec-art py-4 text-center" {% if widget.bgimage is defined and widget.bgimage != null %}style="background: url({{asset_image(widget.bgimage)}}) " {% else %} style="background-color:{{widget.bgcolor}}"{% endif %}>
<div class="container-fluid">
<div class="list_blocs {{position_texte}}">
<div class="cnt_blocs">
<div class="sub-title">{{widget.subTitle}}</div>
<div class="texte-content">{{widget.description|raw}}</div>
</div>
{% if resultats is defined and resultats is not empty %}
{% set duree = 0.1 %}
{% set multi_affichage = "affichage1" %}
{% if widget.multi_affichage == 1 %}
{% set multi_affichage = "affichage1" %}
{% elseif widget.multi_affichage == 2 %}
{% set multi_affichage = "affichage2" %}
{% elseif widget.multi_affichage == 3 %}
{% set multi_affichage = "affichage3" %}
{% elseif widget.multi_affichage == 4 %}
{% set multi_affichage = "affichage4" %}
{% elseif widget.multi_affichage == 5 %}
{% set multi_affichage = "affichage5" %}
{% elseif widget.multi_affichage == 6 %}
{% set multi_affichage = "affichage6" %}
{% elseif widget.multi_affichage == 7 %}
{% set multi_affichage = "affichage7" %}
{% elseif widget.multi_affichage == 8 %}
{% set multi_affichage = "affichage8" %}
{% elseif widget.multi_affichage == 9 %}
{% set multi_affichage = "affichage9" %}
{% elseif widget.multi_affichage == 10 %}
{% set multi_affichage = "affichage10" %}
{% elseif widget.multi_affichage == 11 %}
{% set multi_affichage = "affichage11" %}
{% endif %}
<section class="blocs">
{% if template is defined and template is not empty %}
{{ include(template_from_string(template.twig)) }}
{% endif %}
</section>
{% endif %}
</div>
</div>
{% if widget.link is not empty and widget.buttonlabel is not empty %}
<div class="container-fluid wrapper">
<div class="bouton-articles text-center my-3">
<button class="btn-back-pulse" onclick="window.location.href = '{{widget.link}}';" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</button>
</div>
</div>
{% endif %}
</section>