custom/plugins/MsrTheme/src/Resources/views/storefront/layout/meta.html.twig line 184

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
  2. {% block layout_head_inner %}
  3.     {% set metaInformation = page.metaInformation %}
  4.     {% set basicConfig = config('core.basicInformation') %}
  5.     {% set maxLength = config('seo.descriptionMaxLength') %}
  6.     {% set metaDescription = metaInformation.metaDescription|striptags|trim|u.truncate(maxLength ?? 255, '…') %}
  7.     {% set metaTitle = metaInformation.metaTitle|striptags|trim %}
  8.     {% set metaKeywords = metaInformation.metaKeywords|striptags|trim %}
  9.     <head>
  10.         <link rel="preconnect" href="//app.eu.usercentrics.eu">
  11.         <link rel="preconnect" href="//api.eu.usercentrics.eu">
  12.         <link rel="preconnect" href="//sdp.eu.usercentrics.eu">
  13.         <link rel="preload" href="//app.eu.usercentrics.eu/browser-ui/latest/loader.js" as="script">
  14.         <link rel="preload" href="//sdp.eu.usercentrics.eu/latest/uc-block.bundle.js" as="script">
  15.         <script id="usercentrics-cmp" async data-eu-mode="true" data-settings-id="N2Dyn4_gi"
  16.                 src="https://app.eu.usercentrics.eu/browser-ui/latest/loader.js"></script>
  17.         <script type="application/javascript" src="https://sdp.eu.usercentrics.eu/latest/uc-block.bundle.js"></script>
  18.         <!-- Facebook Pixel Code -->
  19.         <script>
  20.             !function (f, b, e, v, n, t, s) {
  21.                 if (f.fbq) return;
  22.                 n = f.fbq = function () {
  23.                     n.callMethod ?
  24.                         n.callMethod.apply(n, arguments) : n.queue.push(arguments)
  25.                 };
  26.                 if (!f._fbq) f._fbq = n;
  27.                 n.push = n;
  28.                 n.loaded = !0;
  29.                 n.version = '2.0';
  30.                 n.queue = [];
  31.                 t = b.createElement(e);
  32.                 t.async = !0;
  33.                 t.src = v;
  34.                 s = b.getElementsByTagName(e)[0];
  35.                 s.parentNode.insertBefore(t, s)
  36.             }(window, document, 'script',
  37.                 'https://connect.facebook.net/en_US/fbevents.js');
  38.             fbq('init', '538309234817634');
  39.             fbq('track', 'PageView');
  40.         </script>
  41.         <noscript>
  42.             <img height="1" width="1"
  43.                  src="https://www.facebook.com/tr?id=538309234817634&ev=PageView
  44. &noscript=1"/>
  45.         </noscript>
  46.         <!-- End Facebook Pixel Code -->
  47.         <!-- Matomo -->
  48.         <script>
  49.             var _paq = window._paq = window._paq || [];
  50.             /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  51.             _paq.push(['disableCookies']);
  52.             _paq.push(['trackPageView']);
  53.             _paq.push(['enableLinkTracking']);
  54.             (function () {
  55.                 var u = "//matomo-analytics.markenstuermer.marketing/";
  56.                 _paq.push(['setTrackerUrl', u + 'matomo.php']);
  57.                 _paq.push(['setSiteId', '2']);
  58.                 var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
  59.                 g.async = true;
  60.                 g.src = u + 'matomo.js';
  61.                 s.parentNode.insertBefore(g, s);
  62.             })();
  63.         </script>
  64.         <!-- End Matomo Code -->
  65.         {% block layout_head_meta_tags %}
  66.             {% block layout_head_meta_tags_charset %}
  67.                 <meta charset="utf-8">
  68.             {% endblock %}
  69.             {% block layout_head_meta_tags_viewport %}
  70.                 <meta name="viewport"
  71.                       content="width=device-width, initial-scale=1, shrink-to-fit=no">
  72.             {% endblock %}
  73.             {% block layout_head_meta_tags_general %}
  74.                 <meta name="author"
  75.                       content="{% block layout_head_meta_tags_general_author %}{{ metaInformation.author|striptags }}{% endblock %}"/>
  76.                 <meta name="robots"
  77.                       content="index,follow"/>
  78.                 <meta name="revisit-after"
  79.                       content="{% block layout_head_meta_tags_general_revisit %}{{ metaInformation.revisit|striptags }}{% endblock %}"/>
  80.                 <meta name="keywords"
  81.                       content="{% block layout_head_meta_tags_keywords %}{{ metaKeywords }}{% endblock %}"/>
  82.                 <meta name="description"
  83.                       content="{% block layout_head_meta_tags_description %}{{ metaDescription }}{% endblock %}"/>
  84.             {% endblock %}
  85.             {% block layout_head_meta_tags_opengraph %}
  86.                 <meta property="og:url"
  87.                       content="{% block layout_head_meta_tags_url_og %}{{ (page.metaInformation.canonical is defined) ? page.metaInformation.canonical : app.request.uri }}{% endblock %}"/>
  88.                 <meta property="og:type"
  89.                       content="{% block layout_head_meta_tags_type_og %}website{% endblock %}"/>
  90.                 <meta property="og:site_name"
  91.                       content="{% block layout_head_meta_tags_sitename_og %}{{ basicConfig.shopName }}{% endblock %}"/>
  92.                 <meta property="og:title"
  93.                       content="{% block layout_head_meta_tags_title_og %}{{ metaTitle }}{% endblock %}"/>
  94.                 <meta property="og:description"
  95.                       content="{% block layout_head_meta_tags_description_og %}{{ metaDescription }}{% endblock %}"/>
  96.                 <meta property="og:image"
  97.                       content="{% block layout_head_meta_tags_image_og %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  98.                 <meta name="twitter:card"
  99.                       content="{% block layout_head_meta_tags_card_twitter %}summary{% endblock %}"/>
  100.                 <meta name="twitter:site"
  101.                       content="{% block layout_head_meta_tags_sitename_twitter %}{{ basicConfig.shopName }}{% endblock %}"/>
  102.                 <meta name="twitter:title"
  103.                       content="{% block layout_head_meta_tags_title_twitter %}{{ metaTitle }}{% endblock %}"/>
  104.                 <meta name="twitter:description"
  105.                       content="{% block layout_head_meta_tags_description_twitter %}{{ metaDescription }}{% endblock %}"/>
  106.                 <meta name="twitter:image"
  107.                       content="{% block layout_head_meta_tags_image_twitter %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  108.             {% endblock %}
  109.             {% block layout_head_meta_tags_schema_webpage %}
  110.                 <meta itemprop="copyrightHolder"
  111.                       content="{% block layout_head_meta_tags_copyright_holder %}{{ basicConfig.shopName }}{% endblock %}"/>
  112.                 <meta itemprop="copyrightYear"
  113.                       content="{% block layout_head_meta_tags_copyright_year %}{{ metaInformation.copyrightYear|striptags }}{% endblock %}"/>
  114.                 <meta itemprop="isFamilyFriendly"
  115.                       content="{% block layout_head_meta_tags_family_friendly %}{% if basicConfig.familyFriendly %}true{% else %}false{% endif %}{% endblock %}"/>
  116.                 <meta itemprop="image"
  117.                       content="{% block layout_head_meta_tags_image_meta %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  118.             {% endblock %}
  119.             {% block layout_head_meta_tags_hreflangs %}
  120.                 {% for link in hrefLang %}
  121.                     <link rel="alternate" hreflang="{{ link.locale }}" href="{{ link.url }}"/>
  122.                 {% endfor %}
  123.             {% endblock %}
  124.         {% endblock %}
  125.         {% block layout_head_favicon %}
  126.             <link rel="shortcut icon"
  127.                   href="{{ theme_config('sw-logo-favicon') }}">
  128.         {% endblock %}
  129.         {% block layout_head_apple %}
  130.             {% if theme_config('sw-logo-share') %}
  131.                 <link rel="apple-touch-icon"
  132.                       sizes="180x180"
  133.                       href="{{ theme_config('sw-logo-share') }}">
  134.             {% endif %}
  135.         {% endblock %}
  136.         {% block layout_head_android %}
  137.             {# @deprecated tag:v6.5.0 - Use the block above, "layout_head_apple", instead #}
  138.         {% endblock %}
  139.         {% block layout_head_canonical %}
  140.             {% if page.metaInformation.canonical %}
  141.                 <link rel="canonical" href="{{ page.metaInformation.canonical }}"/>
  142.             {% endif %}
  143.         {% endblock %}
  144.         {% block layout_head_title %}
  145.             <title itemprop="name">{% apply spaceless %}
  146.                     {% block layout_head_title_inner %}
  147.                         {{ metaTitle }}
  148.                     {% endblock %}
  149.                 {% endapply %}</title>
  150.         {% endblock %}
  151.         {% block layout_head_stylesheet %}
  152.             {% if isHMRMode %}
  153.                 {# CSS will be loaded from the JS automatically #}
  154.             {% else %}
  155.                 {% set assets = theme_config('assets.css') %}
  156.                 {% for file in assets %}
  157.                     <link rel="stylesheet"
  158.                           href="{{ asset(file, 'theme') }}">
  159.                 {% endfor %}
  160.             {% endif %}
  161.         {% endblock %}
  162.         {% block layout_head_javascript_feature %}
  163.             {% sw_include "@Storefront/storefront/component/feature.html.twig" %}
  164.         {% endblock %}
  165.         {# Block for tracking scripts which are required to include in the `head` section of the document #}
  166.         {% block layout_head_javascript_tracking %}
  167.             {% sw_include "@Storefront/storefront/component/analytics.html.twig" %}
  168.         {% endblock %}
  169.         {% block layout_head_javascript_recaptcha %}
  170.             {% sw_include "@Storefront/storefront/component/recaptcha.html.twig" %}
  171.         {% endblock %}
  172.         {% block layout_head_javascript_token %}
  173.         {% endblock %}
  174.         {% if config('core.basicInformation.useDefaultCookieConsent') %}
  175.             {% block layout_head_javascript_cookie_state %}
  176.                 <script>
  177.                     window.useDefaultCookieConsent = true;
  178.                 </script>
  179.             {% endblock %}
  180.         {% endif %}
  181.         {% if feature('FEATURE_NEXT_15917') %}
  182.             {% block layout_head_javascript_router %}
  183.             {# Register all routes that will be needed in JavaScript to the window.router object #}
  184.             <script>
  185.                 window.activeNavigationId = '{{ page.header.navigation.active.id }}';
  186.                 window.router = {
  187.                     'frontend.cart.offcanvas': '{{ path('frontend.cart.offcanvas') }}',
  188.                     'frontend.cookie.offcanvas': '{{ path('frontend.cookie.offcanvas') }}',
  189.                     'frontend.checkout.finish.page': '{{ path('frontend.checkout.finish.page') }}',
  190.                     'frontend.checkout.info^': '{{ path('frontend.checkout.info') }}',
  191.                     'frontend.menu.offcanvas': '{{ path('frontend.menu.offcanvas') }}',
  192.                     'frontend.cms.page': '{{ path('frontend.cms.page') }}',
  193.                     'frontend.cms.navigation.page': '{{ path('frontend.cms.navigation.page') }}',
  194.                     'frontend.account.addressbook': '{{ path('frontend.account.addressbook') }}',
  195.                     'frontend.csrf.generateToken': '{{ path('frontend.csrf.generateToken') }}',
  196.                     'frontend.country.country-data': '{{ path('frontend.country.country.data') }}',
  197.                     'frontend.store-api.proxy': '{{ path('frontend.store-api.proxy') }}',
  198.                 };
  199.                 window.storeApiProxyToken = '{{ sw_csrf("frontend.store-api.proxy", {"mode": "token"}) }}';
  200.                 window.salesChannelId = '{{ app.request.attributes.get('sw-sales-channel-id') }}';
  201.             </script>
  202.             {% endblock %}
  203.             {% block layout_head_javascript_breakpoints %}
  204.             {# Register the available viewport breakpoints the window.breakpoints object #}
  205.             <script>
  206.                 {% set breakpoint = {
  207.                     'xs': theme_config('breakpoint.xs'),
  208.                     'sm': theme_config('breakpoint.sm'),
  209.                     'md': theme_config('breakpoint.md'),
  210.                     'lg': theme_config('breakpoint.lg'),
  211.                     'xl': theme_config('breakpoint.xl')
  212.                 } %}
  213.                 window.breakpoints = {{ breakpoint|json_encode()|raw }};
  214.             </script>
  215.             {% endblock %}
  216.             {% block layout_head_javascript_csrf %}
  217.             <script>
  218.                 window.csrf = {
  219.                     'enabled': '{{ shopware.csrfEnabled }}',
  220.                     'mode': '{{ shopware.csrfMode }}'
  221.                 }
  222.             </script>
  223.             {% endblock %}
  224.         {% if config('core.cart.wishlistEnabled') %}
  225.             {% block layout_head_javascript_wishlist_state %}
  226.             <script>
  227.                 window.customerLoggedInState = {{ context.customer is not null and not context.customer.guest ? 1 : 0 }};
  228.                 window.wishlistEnabled = {{ config('core.cart.wishlistEnabled') }};
  229.             </script>
  230.             {% endblock %}
  231.         {% endif %}
  232.             {# @internal tag:v6.5.0 - jQuery will be removed from the core. This block can be used to add jQuery as a `<script>`. #}
  233.             {% block layout_head_javascript_jquery %}
  234.             {% endblock %}
  235.             {% block layout_head_javascript_hmr_mode %}
  236.         {% if isHMRMode %}
  237.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-node.js" defer></script>
  238.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-shared.js" defer></script>
  239.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/runtime.js" defer></script>
  240.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/app.js" defer></script>
  241.             {# The storefront entry is a combined entry point which contains all plugins & themes #}
  242.             <script type="text/javascript" src="/_webpack_hot_proxy_/js/storefront.js" defer></script>
  243.         {% else %}
  244.             {% for file in theme_config('assets.js') %}
  245.             <script type="text/javascript" src="{{ asset(file, 'theme') }}" defer></script>
  246.             {% endfor %}
  247.         {% endif %}
  248.             {% endblock %}
  249.         {% endif %}
  250.     </head>
  251. {% endblock %}