custom/plugins/TcinnThemeWareStrong/src/Resources/views/storefront/layout/header/top-bar.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/header/top-bar.html.twig' %}
  2. {# TODO: prüfen... #}
  3. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  4. {# ThemeWare: Set theme variables #}
  5. {% set twtHeaderTopBarCurrenciesMenuShow = theme_config('twt-header-top-bar-currencies-menu-show') %}
  6. {% set twtHeaderTopBarHotlineShow = theme_config('twt-header-top-bar-hotline-show') %}
  7. {% set twtHeaderTopBarLanguagesMenuShow = theme_config('twt-header-top-bar-languages-menu-show') %}
  8. {% set twtHeaderTopBarServiceMenuShow = theme_config('twt-header-top-bar-service-menu-show') %}
  9. {% set twtUspBarHeaderLayout = theme_config('twt-usp-bar-header-layout') %}
  10. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  11. {# ThemeWare: Adjustments on the "Top bar" #}
  12. {# TODO: HC-Architecture... #}
  13. {# ThemeWare: Show hotline in top bar #}
  14. {% block layout_header_top_bar %}
  15.     {% if twtHeaderTopBarHotlineShow == 2 and twtUspBarHeaderLayout != 2 %}
  16.         <div class="top-bar d-none d-lg-block">
  17.             <nav class="top-bar-nav">
  18.                 <div class="row align-items-center twt-top-bar">
  19.                     <div class="col-auto">
  20.                         <div class="row twt-top-bar-hotline">
  21.                             <div class="col-auto top-bar-hotline">
  22.                                 {% block layout_header_top_bar_hotline %}
  23.                                     <span class="twt-top-bar-hotline-label">{{ 'twt.header.serviceHotline'|trans|sw_sanitize }}</span>
  24.                                     {{ 'twt.header.serviceHotlineText'|trans|sw_sanitize }}
  25.                                 {% endblock %}
  26.                             </div>
  27.                         </div>
  28.                     </div>
  29.                     <div class="col-auto">
  30.                         <div class="row twt-top-bar-dropdowns">
  31.                             {% apply spaceless %}
  32.                                 <div class="col-auto top-bar-currency">
  33.                                     {{ block('layout_header_top_bar_currency') }}
  34.                                 </div>
  35.                                 <div class="col-auto top-bar-language">
  36.                                     {{ block('layout_header_top_bar_language') }}
  37.                                 </div>
  38.                                 <div class="col-auto top-bar-service">
  39.                                     {{ block('layout_header_top_bar_service') }}
  40.                                 </div>
  41.                             {% endapply %}
  42.                         </div>
  43.                     </div>
  44.                 </div>
  45.             </nav>
  46.         </div>
  47.     {% else %}
  48.         {# Default block #}
  49.         {{ parent() }}
  50.     {% endif %}
  51. {% endblock %}
  52. {# TODO: HC-Architecture... #}
  53. {# Language menu #}
  54. {% block layout_header_top_bar_language %}
  55.     {# ThemeWare: Remove "Language menu" if it is deactivated (twt-header-top-bar-languages-menu-show 1) #}
  56.     {% if twtHeaderTopBarLanguagesMenuShow == 1 %}
  57.         {# ThemeWare: Remove "Language menu" #}
  58.     {% else %}
  59.         {# Default block #}
  60.         {{ parent() }}
  61.     {% endif %}
  62. {% endblock %}
  63. {# TODO: HC-Architecture... #}
  64. {# Currency menu #}
  65. {% block layout_header_top_bar_currency %}
  66.     {# ThemeWare: Remove "Currency menu" if it is deactivated (twt-header-top-bar-currencies-menu-show 1) #}
  67.     {% if twtHeaderTopBarCurrenciesMenuShow == 1 %}
  68.         {# ThemeWare: Remove "Currency menu" #}
  69.     {% else %}
  70.         {# Default block #}
  71.         {{ parent() }}
  72.     {% endif %}
  73. {% endblock %}
  74. {# TODO: HC-Architecture... #}
  75. {# Service menu #}
  76. {# ThemeWare: Show "Service menu" as dropdown or list #}
  77. {% block layout_header_top_bar_service %}
  78.     {% if twtHeaderTopBarServiceMenuShow == 1 %}
  79.         {# ThemeWare: Remove "Service menu" #}
  80.     {% elseif twtHeaderTopBarServiceMenuShow == 2 %}
  81.         {# ThemeWare: Show "Service menu" as dropdown (default) #}
  82.         {% sw_include '@Storefront/storefront/layout/header/actions/service-menu-widget.html.twig' %}
  83.         {# TODO: Check with Shopware v6.5 #}
  84.         {# % sw_include '@Storefront/storefront/themeware/twt-service-menu-widget.html.twig' % #}
  85.     {% elseif twtHeaderTopBarServiceMenuShow == 3 %}
  86.         {# ThemeWare: Show "Service menu" as list #}
  87.         {% sw_include '@Storefront/storefront/themeware/twt-service-menu-list-widget.html.twig' ignore missing %}
  88.     {% endif %}
  89. {% endblock %}