{% import '@SyliusShop/Common/Macro/sectionHeaders.html.twig' as headers %} 
 
{% set displayNews = 0 %} 
{% for association in product.associations  %} 
    {% if association.getType().getCode() == "related_products"%} 
    <div class="max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk"> 
        <div class="border rounded-10 bg-white p-3 p-xl-4"> 
            {{ render(url('sylius_shop_partial_product_association_show', {'productId': product.id, 'id': association.id, 'template': '@SyliusShop/Product/Show/_association.html.twig'})) }} 
        </div> 
    </div> 
    {% else %} 
        {% set displayNews = 1 %} 
    {% endif %} 
{% endfor %} 
 
{% if (product.associations|length == 0) or (displayNews == 1) %} 
    {% set countNbProduct_a_completer = app_get_parameter('nb_product_to_complete') %} 
    {% if not countNbProduct_a_completer %} 
        {% set countNbProduct_a_completer = 4 %} 
    {% endif %} 
    <div class="max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk"> 
        <div class="border rounded-10 bg-white p-3 p-xl-4"> 
        {{ render(url('sylius_shop_partial_product_index_latest', {'count': countNbProduct_a_completer, 'template': '@SyliusShop/Product/_horizontalListWithHeader.html.twig'})) }} 
        </div> 
    </div> 
{% endif %}