commercetools-8.x-1.2-alpha1/modules/commercetools_content/templates/commercetools-product-cards.html.twig

modules/commercetools_content/templates/commercetools-product-cards.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-6',
  'my-2',
  'col-lg-6',
]
%}
{% set item_attributes = create_attribute({'class': item_classes}) %}

{% if no_products_found %}
  <div class="no-products">
    {{ 'No products found.'|t }}
  </div>
{% else %}
  <div class="commercetools-product-cards">
      <div class="col-md-12 col-12 ps-0">
          <div class="row">
            {% for item in items %}
              <div{{ item_attributes }}>
                {{ item }}
              </div>
            {% endfor %}
          </div>
        <div class="row commercetools-product-cards__pager">
          {{ pager }}
        </div>
      </div>
  </div>
{% endif %}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc