{% macro card(product) %} {% set title = product.title.ru ~ ' ' ~ product.brand.ru ~ ' ' ~ product.dimensions.x ~ 'x' ~ product.dimensions.y ~ 'x' ~ product.dimensions.z ~ ' ' ~ product.weight ~ 'г' %}
{{ product.title.ru }}

{{ title | length > 45 ? title | slice(0, 45) ~ '...' : title }}

{% endmacro %} {% if products is not empty %}
{% for product in products %} {% if loop.index % 2 == 0 %} {{ _self.card(product) }} {% endif %} {% endfor %}
{% for product in products %} {% if loop.index % 2 == 1 %} {{ _self.card(product) }} {% endif %} {% endfor %}
{% endif %}