custom/static-plugins/NdTheme/src/Resources/views/storefront/element/cms-element-product-description-reviews.html.twig line 1

Open in your IDE?
  1. {% block element_product_desciption_reviews %}
  2.     {% set product = element.data.product %}
  3.     {# Please keep in mind that the ID of the tabs is being used to DYNAMICALLY include twig templates. Therefore this entire functionality depends on the existence of those templates. #}
  4.     {% set tabs = [
  5.         {
  6.             'name': "pages.product.tab-details-title",
  7.             'id': 'details',
  8.         },
  9.         {
  10.             'name': "pages.product.tab-size-title",
  11.             'id' : 'size-fit',
  12.         },
  13.         {
  14.             'name' : "pages.product.tab-delivery-return-title",
  15.             'id' : 'delivery-return',
  16.         }
  17.     ] %}
  18.     {% if config('core.listing.showReview') %}
  19.         {% set tabs = tabs|merge([
  20.             {
  21.                 'name': "detail.tabsReview",
  22.                 'id': 'reviews',
  23.             },
  24.         ]) %}
  25.     {% endif %}
  26.     {% if element.data.product %}
  27.         {% block product_description_tabs %}
  28.             <div class="section-p-y xl:mt-14">
  29.                 {% block product_description_tabs_nav %}
  30.                     <nav class="product-detail-tab-navigation product-description-reviews-tab-navigation">
  31.                         <ul class="nav nav-tabs flex grid-gap-4 overflow-x-auto md:justify-center md:overflow-x-hidden lg:grid-gap-x-20"
  32.                             id="product-detail-tabs"
  33.                             role="tablist">
  34.                             {% for tab in tabs %}
  35.                                 {% block product_description_tabs_nav_item %}
  36.                                     <li class="nav-item first:ml-8 last:mr-8 md:first:ml-0 md:last:mr-0">
  37.                                         <a class="nav-link tab-trigger block py-2 border-b border-transparent text-grey-600 text-lg font-light whitespace-nowrap transition hover:border-b-black hover:text-black md:py-3 lg:text-3xl {% if loop.first %}active{% endif %}"
  38.                                            id="{{ tab.id }}-tab"
  39.                                            data-toggle="tab"
  40.                                            href="#{{ tab.id }}-tab-pane"
  41.                                            role="tab"
  42.                                            aria-controls="{{ tab.id }}-tab-pane"
  43.                                            aria-selected="true">
  44.                                             {{ tab.name|trans|raw }}
  45.                                         </a>
  46.                                     </li>
  47.                                 {% endblock %}
  48.                             {% endfor %}
  49.                         </ul>
  50.                     </nav>
  51.                 {% endblock %}
  52.                 {% block product_description_tabs_content %}
  53.                     <div class="product-detail-tabs-content boxed-layout mt-6 md:max-w-[540px] md:mx-auto lg:!max-w-[750px]">
  54.                         <div class="tab-content">
  55.                             {% for tab in tabs %}
  56.                                 {% block product_description_tabs_content_item %}
  57.                                     <div class="tab-pane fade show {% if loop.first %}active{% endif %}"
  58.                                          id="{{ tab.id }}-tab-pane"
  59.                                          role="tabpanel"
  60.                                          aria-labelledby="{{ tab.id }}-tab">
  61.                                         {# Please keep in mind that the ID of the tabs is being used to DYNAMICALLY include twig templates.
  62.                             Therefore this entire functionality depends on the existence of those templates. #}
  63.                                         {% sw_include '@Storefront/storefront/page/product-detail/tabs/'~ tab.id ~'.html.twig' ignore missing with {
  64.                                             tab: tab
  65.                                         } %}
  66.                                     </div>
  67.                                 {% endblock %}
  68.                             {% endfor %}
  69.                         </div>
  70.                     </div>
  71.                 {% endblock %}
  72.             </div>
  73.         {% endblock %}
  74.     {% endif %}
  75. {% endblock %}