custom/plugins/TcinnThemeWareClean/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 twtProductDetailTabCustomContentShow = theme_config('twt-product-detail-tab-custom-content-show') %}
  10. {% set twtProductDetailTabManufacturerShow = theme_config('twt-product-detail-tab-manufacturer-show') %}
  11. {% set twtProductDetailTabProductVideosShow = theme_config('twt-product-detail-tab-product-videos-show') %}
  12. {% set videosAvailable = false %}
  13. {% if twtCustomFields.product.twt_clean_pro_custom_field__product__youtube_video is not empty or twtCustomFields.product.twt_clean_pro_custom_field__product__vimeo_video is not empty %}
  14.     {% set videosAvailable = true %}
  15. {% endif %}
  16. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  17. {# ThemeWare: Adjustments on tab navigation #}
  18. {% block page_product_detail_tabs_navigation_description %}
  19.     {# Default block #}
  20.     {{ parent() }}
  21.     {# ThemeWare: Show properties in individuell tab if configured #}
  22.     {# ThemeWare: Add properties tab to navigation #}
  23.     {% if twtProductDetailPropertiesPosition == 2 and page.product.sortedProperties|length > 0 %}
  24.         <li class="nav-item">
  25.             <a class="nav-link product-properties-tab-navigation-link twt-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">
  26.                 {{ "twt.detail.tabProperties.title"|trans|sw_sanitize }}
  27.                 <span class="product-detail-tab-navigation-icon">
  28.                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  29.                 </span>
  30.             </a>
  31.         </li>
  32.     {% endif %}
  33.     {# ThemeWare: Add product videos tab to navigation #}
  34.     {% if twtProductDetailTabProductVideosShow == 2 and videosAvailable %}
  35.         <li class="nav-item">
  36.             <a class="nav-link product-videos-tab-navigation-link twt-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">
  37.                 {{ "twt.detail.tabVideos.title"|trans|sw_sanitize }}
  38.                 <span class="product-detail-tab-navigation-icon">
  39.                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  40.                 </span>
  41.             </a>
  42.         </li>
  43.     {% endif %}
  44.     {# ThemeWare: Add custom tab to navigation #}
  45.     {% if twtProductDetailTabCustomContentShow == 2 and twtCustomFields.product.twt_clean_pro_custom_field__product__custom_tab_text is not empty %}
  46.         <li class="nav-item">
  47.             <a class="nav-link product-custom-tab-navigation-link twt-tab-navigation-link" id="custom-tab" data-toggle="tab" data-offcanvas-tabs="true" href="#custom-tab-pane" role="tab" aria-controls="custom-tab-pane" aria-selected="true">
  48.                 {# Use custom field or snippet as fallback #}
  49.                 {% if twtCustomFields.product.twt_clean_pro_custom_field__product__custom_tab_title is not empty %}
  50.                     {{ twtCustomFields.product.twt_clean_pro_custom_field__product__custom_tab_title }}
  51.                 {% else %}
  52.                     {{ "twt.detail.tabCustom.title"|trans }}
  53.                 {% endif %}
  54.                 <span class="product-detail-tab-navigation-icon">
  55.                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  56.                 </span>
  57.             </a>
  58.         </li>
  59.     {% endif %}
  60.     {# ThemeWare: Add manufacturer tab to navigation #}
  61.     {# TODO: Check availability #}
  62.     {% if twtProductDetailTabManufacturerShow == 2 %}
  63.         <li class="nav-item">
  64.             <a class="nav-link product-manufacturer-tab-navigation-link twt-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">
  65.                 {{ "twt.detail.tabManufacturer.title"|trans|sw_sanitize }}
  66.                 <span class="product-detail-tab-navigation-icon">
  67.                     {% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
  68.                 </span>
  69.             </a>
  70.         </li>
  71.     {% endif %}
  72. {% endblock %}
  73. {# ThemeWare: Adjustments on tab content #}
  74. {% block page_product_detail_tabs_content_description %}
  75.     {# Default block > load "page/product-detail/description.html.twig" #}
  76.     {{ parent() }}
  77.     {# ThemeWare: Show properties in individuell tab if configured #}
  78.     {# ThemeWare: Add properties content to tab #}
  79.     {% if twtProductDetailPropertiesPosition == 2 and page.product.sortedProperties|length > 0 %}
  80.         <div class="tab-pane fade show"
  81.              id="properties-tab-pane"
  82.              role="tabpanel"
  83.              aria-labelledby="properties-tab">
  84.             {% sw_include '@Storefront/storefront/themeware/product-detail/twt-product-detail-tab-properties.html.twig' ignore missing %}
  85.         </div>
  86.     {% endif %}
  87.     {# ThemeWare: Add product videos content to tab #}
  88.     {% if twtProductDetailTabProductVideosShow == 2 and videosAvailable %}
  89.         <div class="tab-pane fade show"
  90.              id="product-videos-tab-pane"
  91.              role="tabpanel"
  92.              aria-labelledby="product-videos-tab">
  93.             {% sw_include '@Storefront/storefront/themeware/product-detail/twt-product-detail-tab-product-videos.html.twig' ignore missing %}
  94.         </div>
  95.     {% endif %}
  96.     {# ThemeWare: Add custom content to tab #}
  97.     {% if twtProductDetailTabCustomContentShow == 2 and twtCustomFields.product.twt_clean_pro_custom_field__product__custom_tab_text is not empty %}
  98.         <div class="tab-pane fade show"
  99.              id="custom-tab-pane"
  100.              role="tabpanel"
  101.              aria-labelledby="custom-tab">
  102.             {% sw_include '@Storefront/storefront/themeware/product-detail/twt-product-detail-tab-custom.html.twig' ignore missing %}
  103.         </div>
  104.     {% endif %}
  105.     {# ThemeWare: Add manufacturer content to tab #}
  106.     {# TODO: Check availability #}
  107.     {% if twtProductDetailTabManufacturerShow == 2 %}
  108.         <div class="tab-pane fade show"
  109.              id="manufacturer-tab-pane"
  110.              role="tabpanel"
  111.              aria-labelledby="manufacturer-tab">
  112.             {% sw_include '@Storefront/storefront/themeware/product-detail/twt-product-detail-tab-manufacturer.html.twig' ignore missing %}
  113.         </div>
  114.     {% endif %}
  115. {% endblock %}