custom/plugins/zenitPlatformHorizon/src/Resources/views/storefront/layout/header/header.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/header/header.html.twig' %}
  2. {% block layout_header %}
  3.     {% set topBarStyle = theme_config('zen-top-bar-style') %}
  4.     {% if theme_config('zen-top-bar-style') is same as ('hidden') and (page.header.languages.count > 1 or page.header.currencies.count > 1 or config('zenitPlatformHorizon.config.marketingActive')) %}
  5.         {% set topBarStyle = 'offcanvas' %}
  6.     {% else %}
  7.         {% set topBarStyle = theme_config('zen-top-bar-style') %}
  8.     {% endif %}
  9.     {% block layout_top_bar %}
  10.         {% if topBarStyle is same as('offcanvas') %}
  11.             {% if theme_config('zen-header-style') is not same as ('two-line') or (theme_config('zen-header-style') is same as ('two-line') and config('zenitPlatformHorizon.config.marketingActive')) %}
  12.                 <div class="d-none js-top-bar-offcanvas-initial-content">
  13.                     {% sw_include '@zenitPlatformHorizon/storefront/layout/header/zen-top-bar-offcanvas.html.twig' with {topBarStyle: topBarStyle} %}
  14.                 </div>
  15.             {% endif %}
  16.         {% else %}
  17.             {% if theme_config('zen-header-style') is not same as ('two-line') or (theme_config('zen-header-style') is same as ('two-line') and config('zenitPlatformHorizon.config.marketingActive')) %}
  18.                 <div class="collapse{% if topBarStyle is same as ('collapsible') or topBarStyle is same as ('default') %} show{% endif %}"
  19.                      id="topBarCollapse">
  20.                     {% sw_include '@Storefront/storefront/layout/header/top-bar.html.twig' with {topBarStyle: topBarStyle} %}
  21.                 </div>
  22.             {% endif %}
  23.         {% endif %}
  24.     {% endblock %}
  25.     {% block layout_header_navigation %}
  26.         <div class="nav-header {{ navHeaderClasses|join(' ') }}">
  27.             <div class="container">
  28.                 {# @deprecated @zenit tag:v3.1.0 - Bootstrap v5 #}
  29.                 <div class="header-row row{% if feature('v6.5.0.0') %} gx-1{% else %} header-gutters{% endif %} align-items-center {{ headerRowClasses }}">
  30.                     {% block layout_header_logo %}
  31.                         <div class="header-logo-col {{ logoClasses }}">
  32.                             {% sw_include '@Storefront/storefront/layout/header/logo.html.twig' %}
  33.                         </div>
  34.                     {% endblock %}
  35.                     {% if theme_config('zen-header-style') is same as ('single-line') %}
  36.                         {% block layout_header_main_navigation %}
  37.                             <div class="header-nav-col nav-main {{ mainNavigationClasses }} {{ navMainClasses|join(' ') }}">
  38.                                 {% block layout_header_main_navigation_inner %}
  39.                                     {% sw_include '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
  40.                                 {% endblock %}
  41.                             </div>
  42.                         {% endblock %}
  43.                     {% endif %}
  44.                     {% if theme_config('zen-header-style') is same as ('two-line') %}
  45.                         {% block zen_layout_header_top_bar %}
  46.                             <div class="header-top-bar-col {{ topBarClasses }}">
  47.                                 <div class="row {{ gridNoGuttersClass }}">
  48.                                     {% block zen_layout_navigation_offcanvas_navigation_action_language %}
  49.                                         {% sw_include '@Storefront/storefront/layout/header/actions/language-widget.html.twig' %}
  50.                                     {% endblock %}
  51.                                     {% block zen_layout_navigation_offcanvas_navigation_action_currency %}
  52.                                         {% sw_include '@Storefront/storefront/layout/header/actions/currency-widget.html.twig' %}
  53.                                     {% endblock %}
  54.                                     {% block zen_layout_navigation_offcanvas_navigation_action_service %}
  55.                                         {% sw_include '@Storefront/storefront/layout/header/actions/service-menu-widget.html.twig' %}
  56.                                     {% endblock %}
  57.                                 </div>
  58.                             </div>
  59.                         {% endblock %}
  60.                     {% endif %}
  61.                     {% block layout_header_navigation_toggle %}
  62.                         <div class="header-menu-button {{ mainNavigationToggleClasses }}"
  63.                              data-zen-tooltip-title="{{ "general.menuLink"|trans|striptags }}">
  64.                             {{ block('layout_header_navigation_toggle_button') }}
  65.                         </div>
  66.                     {% endblock %}
  67.                     {% block layout_header_search %}
  68.                         {% if theme_config('zen-search-style') is not same as('expandable') %}
  69.                             <div class="header-search-col {{ searchClasses }}">
  70.                                 {% if theme_config('zen-search-style') is same as('overlay') %}
  71.                                     {% block zen_layout_header_search_overlay_close %}
  72.                                         <button class="d-none js-overlay-close"
  73.                                                 type="button"
  74.                                                 aria-label="Close">
  75.                                             {% block zen_layout_header_search_overlay_close_icon %}
  76.                                                 {% sw_icon 'x' style { 'size': 'lg' } %}
  77.                                             {% endblock %}
  78.                                         </button>
  79.                                     {% endblock %}
  80.                                 {% endif %}
  81.                                 {% sw_include '@Storefront/storefront/layout/header/search.html.twig' %}
  82.                             </div>
  83.                         {% endif %}
  84.                     {% endblock %}
  85.                     {% block layout_header_actions %}
  86.                         <div class="header-actions-col {{ actionClasses }}">
  87.                             {# @deprecated @zenit tag:v3.1.0 - Bootstrap v5 #}
  88.                             <div class="row{% if feature('v6.5.0.0') %} gx-1{% else %} no-gutters{% endif %}{% if theme_config('zen-logo-position') is not same as ('right') %} justify-content-end{% endif %}">
  89.                                 {% block layout_header_search_toggle %}
  90.                                     <div class="col-auto{% if theme_config('zen-search-style') is same as('default') %} d-sm-none{% endif %}{% if theme_config('zen-header-style-mobile') is same as ('single-line') and theme_config('zen-logo-position') is same as ('center') %} {{ marginEndClass }}-auto{% endif %}">
  91.                                         <div class="search-toggle"
  92.                                              data-zen-tooltip-title="{{ "header.searchButton"|trans|striptags }}">
  93.                                             <button class="btn header-actions-btn search-toggle-btn js-search-toggle-btn collapsed"
  94.                                                     type="button"
  95.                                                     {% if theme_config('zen-search-style') is same as('overlay') %}
  96.                                                         data-zen-toggle="overlay"
  97.                                                     {% else %}
  98.                                                         {{ dataBsToggleAttr }}="collapse"
  99.                                                         {{ dataBsTargetAttr }}="#searchCollapse"
  100.                                                         aria-expanded="false"
  101.                                                         aria-controls="searchCollapse"
  102.                                                     {% endif %}
  103.                                                     aria-label="{{ "header.searchButton"|trans|striptags }}">
  104.                                                 {% sw_icon 'search' %}
  105.                                                 {% sw_icon 'x' style { 'class': 'search-close d-none' } %}
  106.                                             </button>
  107.                                         </div>
  108.                                     </div>
  109.                                 {% endblock %}
  110.                                 {% if config('core.cart.wishlistEnabled') %}
  111.                                     {% block layout_header_actions_wishlist %}
  112.                                         <div class="col-auto">
  113.                                             <div class="header-wishlist"
  114.                                                  data-zen-tooltip-title="{{ "header.wishlist"|trans|striptags }}">
  115.                                                 <a class="btn header-wishlist-btn header-actions-btn"
  116.                                                    href="{{ path('frontend.wishlist.page') }}"
  117.                                                    title="{{ 'header.wishlist'|trans|striptags }}"
  118.                                                    aria-label="{{ 'header.wishlist'|trans|striptags }}">
  119.                                                     {% sw_include '@Storefront/storefront/layout/header/actions/wishlist-widget.html.twig' %}
  120.                                                 </a>
  121.                                             </div>
  122.                                         </div>
  123.                                     {% endblock %}
  124.                                 {% endif %}
  125.                                 {% block layout_header_actions_account %}
  126.                                     <div class="col-auto">
  127.                                         <div class="account-menu"
  128.                                              data-zen-tooltip-title="{{ "account.myAccount"|trans|striptags }}">
  129.                                             {% sw_include '@Storefront/storefront/layout/header/actions/account-widget.html.twig' %}
  130.                                         </div>
  131.                                     </div>
  132.                                 {% endblock %}
  133.                                 {% block layout_header_actions_cart %}
  134.                                     <div class="col-auto">
  135.                                         <div class="header-cart"
  136.                                              data-offcanvas-cart="true"
  137.                                              data-zen-tooltip-title="{{ "checkout.cartTitle"|trans|striptags }}">
  138.                                             <a class="btn header-cart-btn header-actions-btn"
  139.                                                href="{{ path('frontend.checkout.cart.page') }}"
  140.                                                data-cart-widget="true"
  141.                                                title="{{ 'checkout.cartTitle'|trans|striptags }}"
  142.                                                aria-label="{{ 'checkout.cartTitle'|trans|striptags }}">
  143.                                                 {% sw_include '@Storefront/storefront/layout/header/actions/cart-widget.html.twig' %}
  144.                                             </a>
  145.                                         </div>
  146.                                     </div>
  147.                                 {% endblock %}
  148.                                 {% block zen_layout_header_top_bar_toggle %}
  149.                                     {# marketingBannerId is needed for storagekey invalidation #}
  150.                                     {% set marketingBanner = [] %}
  151.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingActive')]|merge(marketingBanner) %}
  152.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingText')]|merge(marketingBanner) %}
  153.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingButtonText')]|merge(marketingBanner) %}
  154.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingButtonLink')]|merge(marketingBanner) %}
  155.                                     {% set marketingBanner = [config('zenitPlatformHorizon.config.marketingButtonTarget')]|merge(marketingBanner) %}
  156.                                     {% set marketingBannerId = marketingBanner|json_encode()|length %}
  157.                                     {% set collapseTopBarOptions = {
  158.                                         id: topBarStyle ~ '-' ~ marketingBannerId,
  159.                                         type: topBarStyle
  160.                                     } %}
  161.                                     {% if topBarStyle is not same as ('default') and topBarStyle is not same as ('hidden')  %}
  162.                                         {% if theme_config('zen-header-style') is not same as ('two-line') or (theme_config('zen-header-style') is same as ('two-line') and config('zenitPlatformHorizon.config.marketingActive')) %}
  163.                                             <div class="col-auto d-none d-lg-block">
  164.                                                 <div class="top-bar-toggle"
  165.                                                      data-zen-tooltip-title="{{ "zentheme.general.moreLink"|trans|striptags }}">
  166.                                                     <button class="btn header-actions-btn top-bar-toggle-btn"
  167.                                                             type="button"
  168.                                                             aria-label="{{ "zentheme.general.moreLink"|trans|striptags }}"
  169.                                                         {% if topBarStyle is same as ('offcanvas') %}
  170.                                                             data-offcanvas-top-bar="true"
  171.                                                         {% endif %}
  172.                                                         {% if topBarStyle is same as ('collapsible') %}
  173.                                                             {{ dataBsToggleAttr }}="collapse"
  174.                                                             {{ dataBsTargetAttr }}="#topBarCollapse"
  175.                                                             aria-expanded="true"
  176.                                                             data-zen-collapse-top-bar-options="{{ collapseTopBarOptions|json_encode }}"
  177.                                                         {% endif %}
  178.                                                         {% if topBarStyle is same as ('expandable') %}
  179.                                                             {{ dataBsToggleAttr }}="collapse"
  180.                                                             {{ dataBsTargetAttr }}="#topBarCollapse"
  181.                                                             aria-expanded="false"
  182.                                                             data-zen-collapse-top-bar-options="{{ collapseTopBarOptions|json_encode }}"
  183.                                                         {% endif %}>
  184.                                                         {% if theme_config('zen-main-navigation-style') is same as ('offcanvas-lg')
  185.                                                             or theme_config('zen-main-navigation-style') is same as ('offcanvas-xl')
  186.                                                             or theme_config('zen-header-style') is same as ('single-line') and theme_config('zen-logo-position') is same as ('center') and theme_config('zen-header-style-mobile') is same as ('single-line') %}
  187.                                                             {% sw_icon 'more-vertical' %}
  188.                                                         {% else %}
  189.                                                             {% sw_icon 'stack' %}
  190.                                                         {% endif %}
  191.                                                     </button>
  192.                                                 </div>
  193.                                             </div>
  194.                                         {% endif %}
  195.                                     {% endif %}
  196.                                 {% endblock %}
  197.                             </div>
  198.                         </div>
  199.                     {% endblock %}
  200.                 </div>
  201.             </div>
  202.             {% block layout_header_search_expandable %}
  203.                 {% if theme_config('zen-search-style') is same as('expandable') %}
  204.                     <div class="header-search-col">
  205.                         {% sw_include '@Storefront/storefront/layout/header/search.html.twig' %}
  206.                     </div>
  207.                 {% endif %}
  208.             {% endblock %}
  209.         </div>
  210.     {% endblock %}
  211. {% endblock %}