templates/layout/default.html.twig line 1

Open in your IDE?
  1. <!doctype html>
  2. <html lang="{{ app.request.locale }}">
  3. <head>
  4.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  5.     <meta charset="UTF-8">
  6.     {{ include('layout/includes/font-preload.html.twig', {
  7.         fontsToPreload: ['Telegraf-Bold', 'Telegraf-Medium', 'Telegraf-SemiBold', 'iconfont']
  8.     }) }}
  9.     {% block header deferred %}
  10.         {% if not editmode and document is instanceof('\\Pimcore\\Model\\Document\\Page') %}
  11.             {{ elements_robots().checkNoIndexParams(['page'])|raw }}
  12.             {{ elements_head_title() }}
  13.             {{ elements_head_meta() }}
  14.             {{ elements_canonical() }}
  15.             {{ elements_hreflang() }}
  16.             {{ elements_opengraph() }}
  17.         {% endif %}
  18.         {{ include('layout/includes/head.html.twig') }}
  19.     {% endblock %}
  20.     {# add default jsConfig stuff here... e.g. cookiebar #}
  21.     {% do jsConfig().add({
  22.         'lang': app.request.locale,
  23.         'admin': editmode ? true : false
  24.     }) %}
  25.     {% do jsConfig('_cartConfig').add({
  26.         'updateUrl': path('cart_update'),
  27.         'infoUrl': path('cart_ajax'),
  28.     }) %}
  29.     {# Translations #}
  30.     {% do jsConfig('_translations').add({
  31.         'alert-notification.generic-error': 'alert-notification.generic-error'|trans,
  32.         'alert-notification.close': 'alert-notification.close'|trans,
  33.         'whishlist.remove': 'wishlist.remove'|trans,
  34.         'whishlist.add': 'wishlist.add'|trans,
  35.     }) %}
  36.     {# Cookie-Bar #}
  37.     {{ include('layout/includes/cookie-bar.html.twig') }}
  38.     {% do elements_opengraph().setFallbackImage(siteConfig().logo) %}
  39.     <script>
  40.         {% if app.session.flashBag.has('tracking') %}
  41.             {% for message in app.session.flashBag.get('tracking') %}
  42.                 dataLayer.push({{ message|json_encode|raw }});
  43.             {% endfor %}
  44.         {% endif %}
  45.     </script>
  46.     {% if app.session.flashBag.has(constant('\\App\\Services\\Tracking\\UserTrackingService::FLASH_MESSAGE_BAG_KEY')) %}
  47.         <script>
  48.             {% for message in app.session.flashBag.get(constant('\\App\\Services\\Tracking\\UserTrackingService::FLASH_MESSAGE_BAG_KEY')) %}
  49.                 {{ message|raw }}
  50.             {% endfor %}
  51.         </script>
  52.     {% endif %}
  53. </head>
  54. <body>
  55. {% set siteData = getExternalSiteForCountry() %}
  56. {% if siteData %}
  57.     {{ include('includes/areas/country-redirect-modal.html.twig') }}
  58. {% endif %}
  59. {# Popup Modals #}
  60. {% block _modals %}
  61. {% endblock %}
  62. {{ include('layout/includes/skip-links.html.twig') }}
  63. {{ include('layout/includes/table-of-content.html.twig') }}
  64. <div class="site">
  65.     {# Content #}
  66.     {% if not editmode %}
  67.         {% block headerblock %}
  68.             {{ include('global/header.html.twig') }}
  69.         {% endblock %}
  70.     {% endif %}
  71.     <main id="main-content" class="main-content js-affix__container js-smoothscroll" role="main" tabindex="-1">
  72.         {{ block('_content') }}
  73.     </main>
  74.     {% if not editmode and document.property('footer')%}
  75.         {{ pimcore_inc(document.property('footer'), {
  76.             mainDocId: document.id
  77.         }) }}
  78.     {% endif %}
  79.     {% if document.property('searchModal') %}
  80.         {{ pimcore_inc(document.property('searchModal'), {
  81.         }) }}
  82.     {% endif %}
  83. </div>
  84. {% if not editmode and document.property('survey-sparrow-token') %}
  85.     {{ include('includes/survey-sparrow/survey-sparrow.html.twig', {
  86.         surveySparrowToken: document.property('survey-sparrow-token'),
  87.     }) }}
  88. {% endif %}
  89. {# JS Config ausgeben #}
  90. {% block layout_head_meta deferred %}
  91. {{ jsConfig() }}
  92. {% endblock %}
  93. {% if app.request.get('onlyInlineCss') is empty %}
  94.     {% set file = pimcore_placeholder('jsFile') | default('js/content') %}
  95.     {% set staticDebugMode = staticDebugMode is defined ? staticDebugMode : true %}
  96.     {% apply spaceless %}
  97.         {% for file in encore_entry_js_files(file, staticDebugMode ? 'debug' : 'build' ) %}
  98.             <script data-cookieconsent="ignore" src="{{ asset(file) }}" async></script>
  99.         {% endfor %}
  100.     {% endapply %}
  101. {% endif %}
  102. {# Debug Mode #}
  103. {% if elements_debug_mode() and app.request.get('liveCss') is empty %}
  104.     {% set message = elements_debug_message('/entrypoints.json') %}
  105.     {% if message is not empty %}
  106.         <script data-cookieconsent="ignore" type="text/javascript">
  107.             (function () {
  108.                 var debugError = window.setInterval(function () {
  109.                     if (document.body) {
  110.                         clearInterval(debugError);
  111.                         var div = ''; // <div id="warning-static-release">{{ message | raw }}</div>
  112.                         document.body.insertAdjacentHTML('beforeend', div);
  113.                     }
  114.                 }, 100);
  115.             })();
  116.         </script>
  117.         <style type="text/css">
  118.             #warning-static-release {
  119.                 position: fixed;
  120.                 bottom: calc(10rem / 16);
  121.                 right: calc(10rem / 16);
  122.                 padding: calc(5rem / 16) calc(20rem / 16);
  123.                 background: #cd231c;
  124.                 color: #ffffff;
  125.                 z-index: 1000;
  126.                 border-radius: calc(4rem / 16);
  127.                 opacity: .5;
  128.                 pointer-events: none;
  129.             }
  130.             #warning-static-release:hover {
  131.                 opacity: .1;
  132.             }
  133.             #warning-static-release div {
  134.                 text-align: right;
  135.                 font-size: calc(12rem / 16);
  136.             }
  137.         </style>
  138.     {% endif %}
  139. {% endif %}
  140. {{ jld_document(document) }}
  141. </body>
  142. </html>