custom/plugins/ShopWithMeUI/src/Resources/views/storefront/layout/meta.html.twig line 124

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