commercetools-8.x-1.2-alpha1/modules/commercetools_content/templates/commercetools-filter-option.html.twig

modules/commercetools_content/templates/commercetools-filter-option.html.twig
{#
/**
 * @file
 * Default theme implementation for a filter option.
 *
 * Available variables
 * - label: A label for the filter option.
 * - count: The number of items of this option.
 * - key: The attributes key.
 *
 * @ingroup themeable
 */
#}

{% set label_attributes = create_attribute() %}
{% set label_attributes = label_attributes.addClass([
    'text-truncate'
  ]) %}

{% set badge_attributes = create_attribute() %}
{% set badge_attributes = badge_attributes.addClass([
    'badge',
    'rounded-pill',
    'muted',
    'text-bg-light',
]) %}

{% block content %}
  {{ attach_library('commercetools/commercetools.bootstrap_checker') }}
  <span{{attributes}}>
    <span{{label_attributes}}>{{render_var({ '#theme': 'commercetools_product_attribute_label', '#key': key, '#label': label })}}</span>
    <span{{badge_attributes}}>{{count}}</span>
  </span>
{% endblock %}

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

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