commercetools-8.x-1.2-alpha1/modules/commercetools_content/templates/commercetools-product-list.html.twig
modules/commercetools_content/templates/commercetools-product-list.html.twig
{#
/**
* @file
*
* Default product card list template.
*
* Available variables:
* - filter: The optional list filter.
* - list: List items.
* - pager: The optional pager next/prev links to display.
*
* @ingroup themeable
*/
#}
{{ attach_library('commercetools/commercetools.bootstrap_checker') }}
{%
set item_classes = [
'ps-0',
'col-12',
'col-md-12',
'my-2',
'col-lg-' ~ (12 // columns_number),
]
%}
{% set item_attributes = create_attribute({'class': item_classes}) %}
{% if no_products_found %}
<div class="no-products">
{{ 'No products found.'|t }}
</div>
{% else %}
<div class="container commercetools-product-list py-3">
<div class="row">
<div class="container">
<div class="row gy-4">
{% for item in items %}
<div{{ item_attributes.addClass('col-12') }}>
{{ item }}
</div>
{% endfor %}
</div>
</div>
<div class="row commercetools-product-list__pager">
{{ pager }}
</div>
</div>
</div>
{% endif %}
