custom/plugins/SwagHoggi/src/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {# Set variable to "true" to enable HMR (hot page reloading) mode #}
  3. {% set isHMRMode = app.request.headers.get('hot-reload-mode') and app.environment == 'dev' %}
  4. {% block base_doctype %}
  5. <!DOCTYPE html>
  6. {% endblock %}
  7. {% block base_html %}
  8. <html lang="{{ page.header.activeLanguage.translationCode.code }}"
  9.       itemscope="itemscope"
  10.       itemtype="https://schema.org/WebPage">
  11. {% endblock %}
  12. {% block base_head %}
  13.     {% sw_include '@Storefront/storefront/layout/meta.html.twig' %}
  14. {% endblock %}
  15. {% block base_body %}
  16.     <body class="{% block base_body_classes %}is-ctl-{% if controllerName is not empty %}{{ controllerName|lower }}{% endif %} is-act-{% if controllerAction is not empty %}{{ controllerAction|lower }}{% endif %}{% endblock %}">
  17.     {% block base_body_inner %}
  18.         {% block base_noscript %}
  19.             <noscript class="noscript-main">
  20.                 {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  21.                     type: 'info',
  22.                     content: 'general.noscriptNotice'|trans|sw_sanitize
  23.                 } %}
  24.             </noscript>
  25.         {% endblock %}
  26.         {% block base_header %}
  27.             <header class="header-main">
  28.                 {% block base_header_inner %}
  29.                     <div class="container">
  30.                         {% sw_include '@Storefront/storefront/layout/header/header.html.twig' %}
  31.                     </div>
  32.                 {% endblock %}
  33.             </header>
  34.         {% endblock %}
  35.             {% block base_main %}
  36.                     <main class="content-main">
  37.                             {% block base_flashbags %}
  38.                                     <div class="flashbags container">
  39.                                             {% for type, messages in app.flashes %}
  40.                                                     {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type: type, list: messages } %}
  41.                                             {% endfor %}
  42.                                     </div>
  43.                             {% endblock %}
  44.                             {% block base_main_inner %}
  45.                                 <div class="container">
  46.                                     {% block base_main_container %}
  47.                                         <div class="container-main">
  48.                                             {% block base_breadcrumb %}
  49.                                                 {% sw_include '@Storefront/storefront/layout/breadcrumb.html.twig' with {
  50.                                                     context: context,
  51.                                                     category: page.product.seoCategory
  52.                                                 } only %}
  53.                                             {% endblock %}
  54.                                             {% block base_content %}{% endblock %}
  55.                                         </div>
  56.                                     {% endblock %}
  57.                                 </div>
  58.                             {% endblock %}
  59.                     </main>
  60.             {% endblock %}
  61.         {% block base_footer %}
  62.             <footer class="footer-main">
  63.                 {% block base_footer_inner %}
  64.                     {% sw_include '@Storefront/storefront/layout/footer/footer.html.twig' %}
  65.                 {% endblock %}
  66.             </footer>
  67.         {% endblock %}
  68.     {% endblock %}
  69.     {% block base_scroll_up %}
  70.         {% sw_include '@Storefront/storefront/layout/scroll-up.html.twig' %}
  71.     {% endblock %}
  72.     {% block base_cookie_permission %}
  73.         {% sw_include '@Storefront/storefront/layout/cookie/cookie-permission.html.twig' %}
  74.     {% endblock %}
  75.     {% block base_pseudo_modal %}
  76.         {% sw_include '@Storefront/storefront/component/pseudo-modal.html.twig' %}
  77.     {% endblock %}
  78.     {% block base_body_script %}
  79.         {% if not feature('FEATURE_NEXT_15917') %}
  80.             {# @deprecated tag:v6.5.0 - Will be moved to `layout/meta.html.twig` - Use block `layout_head_javascript_token` instead #}
  81.             {% block base_script_token %}
  82.             {% endblock %}
  83.             {# @deprecated tag:v6.5.0 - Will be moved to `layout/meta.html.twig` - Use block `layout_head_javascript_router` instead #}
  84.             {% block base_script_router %}
  85.             {# Register all routes that will be needed in JavaScript to the window.router object #}
  86.             <script>
  87.                 window.activeNavigationId = '{{ page.header.navigation.active.id }}';
  88.                 window.router = {
  89.                     'frontend.cart.offcanvas': '{{ path('frontend.cart.offcanvas') }}',
  90.                     'frontend.cookie.offcanvas': '{{ path('frontend.cookie.offcanvas') }}',
  91.                     'frontend.checkout.finish.page': '{{ path('frontend.checkout.finish.page') }}',
  92.                     'frontend.checkout.info': '{{ path('frontend.checkout.info') }}',
  93.                     'frontend.menu.offcanvas': '{{ path('frontend.menu.offcanvas') }}',
  94.                     'frontend.cms.page': '{{ path('frontend.cms.page') }}',
  95.                     'frontend.cms.navigation.page': '{{ path('frontend.cms.navigation.page') }}',
  96.                     'frontend.account.addressbook': '{{ path('frontend.account.addressbook') }}',
  97.                     'frontend.csrf.generateToken': '{{ path('frontend.csrf.generateToken') }}',
  98.                     'frontend.country.country-data': '{{ path('frontend.country.country.data') }}',
  99.                     'frontend.store-api.proxy': '{{ path('frontend.store-api.proxy') }}',
  100.                 };
  101.                 window.storeApiProxyToken = '{{ sw_csrf("frontend.store-api.proxy", {"mode": "token"}) }}';
  102.                 window.salesChannelId = '{{ app.request.attributes.get('sw-sales-channel-id') }}';
  103.             </script>
  104.             {% endblock %}
  105.             {# @deprecated tag:v6.5.0 - Will be moved to `layout/meta.html.twig` - Use block `layout_head_javascript_breakpoints` instead #}
  106.             {% block base_script_breakpoints %}
  107.             {# Register the available viewport breakpoints the window.breakpoints object #}
  108.             <script>
  109.                 {% set breakpoint = {
  110.                     'xs': theme_config('breakpoint.xs'),
  111.                     'sm': theme_config('breakpoint.sm'),
  112.                     'md': theme_config('breakpoint.md'),
  113.                     'lg': theme_config('breakpoint.lg'),
  114.                     'xl': theme_config('breakpoint.xl')
  115.                 } %}
  116.                 {# @deprecated tag:v6.5.0 - Bootstrap v5 adds xxl breakpoint #}
  117.                 {% if feature('v6.5.0.0') %}
  118.                 {% set breakpoint = breakpoint|merge({
  119.                     'xxl': theme_config('breakpoint.xxl')
  120.                 }) %}
  121.                 {% endif %}
  122.                 window.breakpoints = {{ breakpoint|json_encode()|raw }};
  123.             </script>
  124.             {% endblock %}
  125.             {# @deprecated tag:v6.5.0 - Will be moved to `layout/meta.html.twig` - Use block `layout_head_javascript_csrf` instead #}
  126.             {% block base_script_csrf %}
  127.             <script>
  128.                 window.csrf = {
  129.                     'enabled': '{{ shopware.csrfEnabled }}',
  130.                     'mode': '{{ shopware.csrfMode }}'
  131.                 }
  132.             </script>
  133.             {% endblock %}
  134.         {% if config('core.cart.wishlistEnabled') %}
  135.             {# @deprecated tag:v6.5.0 - Will be moved to `layout/meta.html.twig` - Use block `layout_head_javascript_wishlist_state` instead #}
  136.             {% block base_script_wishlist_state %}
  137.             <script>
  138.                 window.customerLoggedInState = {{ context.customer is not null and not context.customer.guest ? 1 : 0 }};
  139.                 window.wishlistEnabled = {{ config('core.cart.wishlistEnabled') }};
  140.             </script>
  141.             {% endblock %}
  142.         {% endif %}
  143.             {# @deprecated tag:v6.5.0 - Will be moved to `layout/meta.html.twig` - Use block `layout_head_javascript_jquery` instead #}
  144.             {% block base_script_jquery %}
  145.             {% endblock %}
  146.             {# @deprecated tag:v6.5.0 - Will be moved to `layout/meta.html.twig` - Use block `layout_head_javascript_hmr_mode` instead #}
  147.             {% block base_script_hmr_mode %}
  148.         {% if isHMRMode %}
  149.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-node.js"></script>
  150.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-shared.js"></script>
  151.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/runtime.js"></script>
  152.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/app.js"></script>
  153.             {# The storefront entry is a combined entry point which contains all plugins & themes #}
  154.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/storefront.js"></script>
  155.         {% else %}
  156.             {% for file in theme_config('assets.js') %}
  157.             <script type="text/javascript" src="{{ asset(file, 'theme') }}"></script>
  158.             {% endfor %}
  159.         {% endif %}
  160.             {% endblock %}
  161.         {% endif %}
  162.     {% endblock %}
  163.     </body>
  164. {% endblock %}