custom/static-plugins/EfbStorefront/Resources/views/storefront/page/product-detail/tabs/tabs.html.twig line 1

Open in your IDE?
  1. {% block page_product_detail_tabs_inner %}
  2.     {% set product = page.product %}
  3.     {% if description is not defined %}
  4.         {% set description = {
  5.             name: "description",
  6.             title: "detail.tabsDescription"|trans|sw_sanitize,
  7.             template: '@Storefront/storefront/page/product-detail/tabs/description.html.twig'
  8.         } %}
  9.     {% endif %}
  10.     {% if properties is not defined %}
  11.         {% if product.sortedProperties|length > 0 %}
  12.             {% set properties = {
  13.                 name: "properties",
  14.                 title: "detail.tabsProperties"|trans|sw_sanitize,
  15.                 template: '@Storefront/storefront/page/product-detail/tabs/properties.html.twig'
  16.             } %}
  17.         {% endif %}
  18.     {% endif %}
  19.     {% if variants is not defined %}
  20.         {% if product.extensions.variants|length > 1 %}
  21.             {% set variants = {
  22.                 name: "variants",
  23.                 title: "detail.tabsVariants"|trans|sw_sanitize,
  24.                 template: '@Storefront/storefront/page/product-detail/tabs/variants.html.twig'
  25.             } %}
  26.         {% endif %}
  27.     {% endif %}
  28.     {% if downloads is not defined %}
  29.         {% if page.MillProductDownloadsTab.files|length > 0 %}
  30.             {% set downloads = {
  31.                 name: "downloads",
  32.                 title: "detail.tabsDownloads"|trans|sw_sanitize,
  33.                 template: '@EfbStorefront/storefront/page/product-detail/tabs/downloads.html.twig'
  34.             } %}
  35.         {% endif %}
  36.     {% endif %}
  37.     {% if volumeProperties is not defined %}
  38.         {% if false %}
  39.             {% set volumeProperties = {
  40.                 name: "volumeProperties",
  41.                 title: "detail.tabsVolumeProperties"|trans|sw_sanitize,
  42.                 template: '@Storefront/storefront/page/product-detail/tabs/volume-properties.html.twig'
  43.             } %}
  44.         {% endif %}
  45.     {% endif %}
  46.     {% for tab in [description, properties, variants, downloads, volumeProperties]|filter(tab => tab.name and tab.title and (tab.template or tab.raw)) %}
  47.         {% set id = "product-detail-tab-" ~ tab.name %}
  48.         <div class="product-detail-tab tab-title{% if loop.index == 1 %} active{% endif %}">
  49.             <a href="#" class="product-detail-tab tab-toggle" data-toggle="product-detail-tab" data-target="#{{ id }}" data-group="product-detail-tabs-{{ page.product.id }}">
  50.                 {{ tab.title }}
  51.                 {% sw_icon 'plus' style {'namespace': 'EfbStorefront'} %}
  52.                 {% sw_icon 'minus' style {'namespace': 'EfbStorefront'} %}
  53.             </a>
  54.         </div>
  55.         <div class="product-detail-tab tab-content{% if loop.index == 1 %} active{% endif %}" id="{{ id }}">
  56.             {% if tab.template is defined %}
  57.                 {% sw_include tab.template %}
  58.             {% elseif tab.raw is defined %}
  59.                 {{ tab.raw|raw }}
  60.             {% endif %}
  61.         </div>
  62.     {% endfor %}
  63. {% endblock %}