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

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
  2. {# ThemeWare® HC-Architecture® ready #}
  3. {# TODO: prüfen... #}
  4. {# ThemeWare: Product detail tab on classic product page #}
  5. {# INFO: Please note this is also available as "element/cms-element-product-description-reviews.html.twig" since SW6.4 #}
  6. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  7. {# ThemeWare: Set theme variables #}
  8. {% set twtProductDetailPropertiesPosition = theme_config('twt-product-detail-properties-position') %}
  9. {% set twtProductDetailTabManufacturerShow = theme_config('twt-product-detail-tab-manufacturer-show') %}
  10. {% set twtProductDetailTabProductVideosShow = theme_config('twt-product-detail-tab-product-videos-show') %}
  11. {% set videosAvailable = false %}
  12. {% if twtCustomFields.product.twt_modern_pro_custom_field__product__youtube_video is not empty or twtCustomFields.product.twt_modern_pro_custom_field__product__vimeo_video is not empty %}
  13.     {% set videosAvailable = true %}
  14. {% endif %}
  15. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  16. {# ThemeWare: Adjustments on tab navigation #}
  17. {% block page_product_detail_tabs_navigation_description %}
  18.     {# Default block #}
  19.     {{ parent() }}
  20.     {# ThemeWare: Show properties in individuell tab if configured #}
  21.     {# ThemeWare: Add properties tab to navigation #}
  22.     {% if twtProductDetailPropertiesPosition == 2 and page.product.sortedProperties|length > 0 %}
  23.         <li class="nav-item">
  24.             <a class="nav-link product-properties-tab-navigation-link" id="properties-tab" data-toggle="tab" data-offcanvas-tabs="true" href="#properties-tab-pane" role="tab" aria-controls="properties-tab-pane" aria-selected="true">
  25.                 {{ "twt.detail.tabProperties.title"|trans|sw_sanitize }}
  26.                 <span class="product-detail-tab-navigation-icon">
  27.                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  28.                 </span>
  29.             </a>
  30.         </li>
  31.     {% endif %}
  32.     {# ThemeWare: Add product videos tab to navigation #}
  33.     {% if twtProductDetailTabProductVideosShow == 2 and videosAvailable %}
  34.         <li class="nav-item">
  35.             <a class="nav-link product-manufacturer-tab-navigation-link" id="product-videos-tab" data-toggle="tab" data-offcanvas-tabs="true" href="#product-videos-tab-pane" role="tab" aria-controls="product-videos-tab-pane" aria-selected="true">
  36.                 {{ "twt.detail.tabVideos.title"|trans|sw_sanitize }}
  37.                 <span class="product-detail-tab-navigation-icon">
  38.                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  39.                 </span>
  40.             </a>
  41.         </li>
  42.     {% endif %}
  43.     {# ThemeWare: Add manufacturer tab to navigation #}
  44.     {# TODO: Check availability #}
  45.     {% if twtProductDetailTabManufacturerShow == 2 %}
  46.         <li class="nav-item">
  47.             <a class="nav-link product-manufacturer-tab-navigation-link" id="manufacturer-tab" data-toggle="tab" data-offcanvas-tabs="true" href="#manufacturer-tab-pane" role="tab" aria-controls="manufacturer-tab-pane" aria-selected="true">
  48.                 {{ "twt.detail.tabManufacturer.title"|trans|sw_sanitize }}
  49.                 <span class="product-detail-tab-navigation-icon">
  50.                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  51.                 </span>
  52.             </a>
  53.         </li>
  54.     {% endif %}
  55. {% endblock %}
  56. {# ThemeWare: Adjustments on tab content #}
  57. {% block page_product_detail_tabs_content_description %}
  58.     {# Default block > load "page/product-detail/description.html.twig" #}
  59.     {{ parent() }}
  60.     {# ThemeWare: Show properties in individuell tab if configured #}
  61.     {# ThemeWare: Add properties content to tab #}
  62.     {% if twtProductDetailPropertiesPosition == 2 and page.product.sortedProperties|length > 0 %}
  63.         <div class="tab-pane fade show"
  64.              id="properties-tab-pane"
  65.              role="tabpanel"
  66.              aria-labelledby="properties-tab">
  67.             {% sw_include '@Storefront/storefront/themeware/product-detail/twt-product-detail-tab-properties.html.twig' ignore missing %}
  68.         </div>
  69.     {% endif %}
  70.     {# ThemeWare: Add product videos content to tab #}
  71.     {% if twtProductDetailTabProductVideosShow == 2 and videosAvailable %}
  72.         <div class="tab-pane fade show"
  73.              id="product-videos-tab-pane"
  74.              role="tabpanel"
  75.              aria-labelledby="product-videos-tab">
  76.             {% sw_include '@Storefront/storefront/themeware/product-detail/twt-product-detail-tab-product-videos.html.twig' ignore missing %}
  77.         </div>
  78.     {% endif %}
  79.     {# ThemeWare: Add manufacturer content to tab #}
  80.     {# TODO: Check availability #}
  81.     {% if twtProductDetailTabManufacturerShow == 2 %}
  82.         <div class="tab-pane fade show"
  83.              id="manufacturer-tab-pane"
  84.              role="tabpanel"
  85.              aria-labelledby="manufacturer-tab">
  86.             {% sw_include '@Storefront/storefront/themeware/product-detail/twt-product-detail-tab-manufacturer.html.twig' ignore missing %}
  87.         </div>
  88.     {% endif %}
  89. {% endblock %}