templates/macro/productShortcode.html.twig line 1
{% macro titre() %}
Gestion des shortcodes
{% endmacro %}
{% block content %}
{% set ids = content|get_product_shortcode() %}
{% set appContent = content|adapt_product_shortcode() %}
{% set scProductsDb = replace_product_shortcode(lang, ids) %}
{% for scProducts in scProductsDb %}
{% set scProductList = [] %}
{% for scProduct in scProducts %}
{% set scProductContent = include('/produit/produitunique.html.twig', {'product': scProduct}) %}
{% set scProductList = scProductList|merge([scProductContent]) %}
{% endfor %}
{% set replaceString = "%product" ~ loop.index0 ~ "%" %}
{% set appContent = appContent|replace({(replaceString): '<div class="list-unstyled nopadding product_list products-block grid clearfix style1 row m-auto mb-4 border-top-0">' ~ scProductList|join('') ~ '</div>'}) %}
{% endfor %}
{{ appContent|raw }}
{% endblock %}