custom/plugins/EmovaTheme/src/Resources/views/storefront/layout/meta.html.twig line 131

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. <!-- Google Tag Manager -->
  10. <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  11. new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  12. j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  13. 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  14. })(window,document,'script','dataLayer','GTM-NRWBNX3J');</script>
  15. <!-- End Google Tag Manager -->
  16.         {% block layout_head_meta_tags %}
  17.             {% block layout_head_meta_tags_charset %}
  18.                 <meta charset="utf-8">
  19.             {% endblock %}
  20.             {% block layout_head_meta_tags_viewport %}
  21.                 <meta name="viewport"
  22.                       content="width=device-width, initial-scale=1, shrink-to-fit=no">
  23.             {% endblock %}
  24.             {% block layout_head_meta_tags_general %}
  25.                 <meta name="author"
  26.                       content="{% block layout_head_meta_tags_general_author %}{{ metaInformation.author|striptags }}{% endblock %}"/>
  27.                 <meta name="robots"
  28.                       {# content="{% block layout_head_meta_tags_robots %}{{ metaInformation.robots }}{% endblock %}"/> #}
  29.                       content="{% block layout_head_meta_tags_robots %}noindex,nofollow{% endblock %}"/>
  30.                 <meta name="revisit-after"
  31.                       content="{% block layout_head_meta_tags_general_revisit %}{{ metaInformation.revisit|striptags }}{% endblock %}"/>
  32.                 <meta name="keywords"
  33.                       content="{% block layout_head_meta_tags_keywords %}{{ metaKeywords }}{% endblock %}"/>
  34.                 <meta name="description"
  35.                       content="{% block layout_head_meta_tags_description %}{{ metaDescription }}{% endblock %}"/>
  36.             {% endblock %}
  37.             {% block layout_head_meta_tags_opengraph %}
  38.                 <meta property="og:url"
  39.                       content="{% block layout_head_meta_tags_url_og %}{{ (page.metaInformation.canonical is defined) ? page.metaInformation.canonical : app.request.uri }}{% endblock %}"/>
  40.                 <meta property="og:type"
  41.                       content="{% block layout_head_meta_tags_type_og %}website{% endblock %}"/>
  42.                 <meta property="og:site_name"
  43.                       content="{% block layout_head_meta_tags_sitename_og %}{{ basicConfig.shopName }}{% endblock %}"/>
  44.                 <meta property="og:title"
  45.                       content="{% block layout_head_meta_tags_title_og %}{{ metaTitle }}{% endblock %}"/>
  46.                 <meta property="og:description"
  47.                       content="{% block layout_head_meta_tags_description_og %}{{ metaDescription }}{% endblock %}"/>
  48.                 <meta property="og:image"
  49.                       content="{% block layout_head_meta_tags_image_og %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  50.                 <meta name="twitter:card"
  51.                       content="{% block layout_head_meta_tags_card_twitter %}summary{% endblock %}"/>
  52.                 <meta name="twitter:site"
  53.                       content="{% block layout_head_meta_tags_sitename_twitter %}{{ basicConfig.shopName }}{% endblock %}"/>
  54.                 <meta name="twitter:title"
  55.                       content="{% block layout_head_meta_tags_title_twitter %}{{ metaTitle }}{% endblock %}"/>
  56.                 <meta name="twitter:description"
  57.                       content="{% block layout_head_meta_tags_description_twitter %}{{ metaDescription }}{% endblock %}"/>
  58.                 <meta name="twitter:image"
  59.                       content="{% block layout_head_meta_tags_image_twitter %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  60.             {% endblock %}
  61.             {% block layout_head_meta_tags_schema_webpage %}
  62.                 <meta itemprop="copyrightHolder"
  63.                       content="{% block layout_head_meta_tags_copyright_holder %}{{ basicConfig.shopName }}{% endblock %}"/>
  64.                 <meta itemprop="copyrightYear"
  65.                       content="{% block layout_head_meta_tags_copyright_year %}{{ metaInformation.copyrightYear|striptags }}{% endblock %}"/>
  66.                 <meta itemprop="isFamilyFriendly"
  67.                       content="{% block layout_head_meta_tags_family_friendly %}{% if basicConfig.familyFriendly %}true{% else %}false{% endif %}{% endblock %}"/>
  68.                 <meta itemprop="image"
  69.                       content="{% block layout_head_meta_tags_image_meta %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  70.             {% endblock %}
  71.             {% block layout_head_meta_tags_hreflangs %}
  72.                 {% for link in hrefLang %}
  73.                     <link rel="alternate" hreflang="{{ link.locale }}" href="{{ link.url }}" />
  74.                 {% endfor %}
  75.             {% endblock %}
  76.         {% endblock %}
  77.         {% block layout_head_favicon %}
  78.             <link rel="shortcut icon"
  79.                   href="{{ theme_config('sw-logo-favicon') }}">
  80.         {% endblock %}
  81.         {% block layout_head_apple %}
  82.             {% if theme_config('sw-logo-share') %}
  83.             <link rel="apple-touch-icon"
  84.                   sizes="180x180"
  85.                   href="{{ theme_config('sw-logo-share') }}">
  86.             {% endif %}
  87.         {% endblock %}
  88.         {% block layout_head_android %}
  89.             {# @deprecated tag:v6.5.0 - Use the block above, "layout_head_apple", instead #}
  90.         {% endblock %}
  91.         {% block layout_head_canonical %}
  92.             {% if page.metaInformation.canonical %}
  93.                 <link rel="canonical" href="{{ page.metaInformation.canonical }}" />
  94.             {% endif %}
  95.         {% endblock %}
  96.         {% block layout_head_title %}
  97.             <title itemprop="name">{% apply spaceless %}
  98.                 {% block layout_head_title_inner %}
  99.                     {{ metaTitle }}
  100.                 {% endblock %}
  101.             {% endapply %}</title>
  102.         {% endblock %}
  103.         {% block layout_head_stylesheet %}
  104.             {% if isHMRMode %}
  105.                 {# CSS will be loaded from the JS automatically #}
  106.             {% else %}
  107.                 {% set assets = theme_config('assets.css') %}
  108.                 {% for file in assets %}
  109.                     <link rel="stylesheet"
  110.                       href="{{ asset(file, 'theme') }}">
  111.                 {% endfor %}
  112.             {% endif %}
  113.         {% endblock %}
  114.         {% block layout_head_javascript_feature %}
  115.             {% sw_include "@Storefront/storefront/component/feature.html.twig" %}
  116.         {% endblock %}
  117.         {# Block for tracking scripts which are required to include in the `head` section of the document #}
  118.         {% block layout_head_javascript_tracking %}
  119.             {% sw_include "@Storefront/storefront/component/analytics.html.twig" %}
  120.         {% endblock %}
  121.         {% block layout_head_javascript_recaptcha %}
  122.             {% sw_include "@Storefront/storefront/component/recaptcha.html.twig" %}
  123.         {% endblock %}
  124.         {% block layout_head_javascript_token %}
  125.         {% endblock %}
  126.         {% if config('core.basicInformation.useDefaultCookieConsent') %}
  127.             {% block layout_head_javascript_cookie_state %}
  128.                 <script>
  129.                     window.useDefaultCookieConsent = true;
  130.                 </script>
  131.             {% endblock %}
  132.         {% endif %}
  133.         {% if feature('FEATURE_NEXT_15917') %}
  134.             {% block layout_head_javascript_router %}
  135.                 {# Register all routes that will be needed in JavaScript to the window.router object #}
  136.                 <script>
  137.                     window.activeNavigationId = '{{ page.header.navigation.active.id }}';
  138.                     window.router = {
  139.                         'frontend.cart.offcanvas': '{{ path('frontend.cart.offcanvas') }}',
  140.                         'frontend.cookie.offcanvas': '{{ path('frontend.cookie.offcanvas') }}',
  141.                         'frontend.checkout.finish.page': '{{ path('frontend.checkout.finish.page') }}',
  142.                         'frontend.checkout.info': '{{ path('frontend.checkout.info') }}',
  143.                         'frontend.menu.offcanvas': '{{ path('frontend.menu.offcanvas') }}',
  144.                         'frontend.cms.page': '{{ path('frontend.cms.page') }}',
  145.                         'frontend.cms.navigation.page': '{{ path('frontend.cms.navigation.page') }}',
  146.                         'frontend.account.addressbook': '{{ path('frontend.account.addressbook') }}',
  147.                         {# @deprecated tag:v6.5.0 - Route frontend.csrf.generateToken will be removed. #}
  148.                         'frontend.csrf.generateToken': '{{ path('frontend.csrf.generateToken') }}',
  149.                         'frontend.country.country-data': '{{ path('frontend.country.country.data') }}',
  150.                         'frontend.store-api.proxy': '{{ path('frontend.store-api.proxy') }}',
  151.                     };
  152.                     {# @deprecated tag:v6.5.0 - storeApiProxyToken will be removed. #}
  153.                     window.storeApiProxyToken = '{{ sw_csrf("frontend.store-api.proxy", {"mode": "token"}) }}';
  154.                     window.salesChannelId = '{{ app.request.attributes.get('sw-sales-channel-id') }}';
  155.                 </script>
  156.             {% endblock %}
  157.             {% block layout_head_javascript_breakpoints %}
  158.                 {# Register the available viewport breakpoints the window.breakpoints object #}
  159.                 <script>
  160.                     {% set breakpoint = {
  161.                         'xs': theme_config('breakpoint.xs'),
  162.                         'sm': theme_config('breakpoint.sm'),
  163.                         'md': theme_config('breakpoint.md'),
  164.                         'lg': theme_config('breakpoint.lg'),
  165.                         'xl': theme_config('breakpoint.xl')
  166.                     } %}
  167.                     window.breakpoints = {{ breakpoint|json_encode()|raw }};
  168.                 </script>
  169.             {% endblock %}
  170.             {# @deprecated tag:v6.5.0 - Block layout_head_javascript_csrf will be removed. #}
  171.             {% block layout_head_javascript_csrf %}
  172.                 <script>
  173.                     window.csrf = {
  174.                         'enabled': '{{ shopware.csrfEnabled }}',
  175.                         'mode': '{{ shopware.csrfMode }}'
  176.                     }
  177.                 </script>
  178.             {% endblock %}
  179.             {% if config('core.cart.wishlistEnabled') %}
  180.                 {% block layout_head_javascript_wishlist_state %}
  181.                     <script>
  182.                         window.customerLoggedInState = {{ context.customer is not null and not context.customer.guest ? 1 : 0 }};
  183.                         window.wishlistEnabled = {{ config('core.cart.wishlistEnabled') }};
  184.                     </script>
  185.                 {% endblock %}
  186.             {% endif %}
  187.             {# @internal tag:v6.5.0 - jQuery will be removed from the core. This block can be used to add jQuery as a `<script>`. #}
  188.             {% block layout_head_javascript_jquery %}
  189.             {% endblock %}
  190.             {% block layout_head_javascript_hmr_mode %}
  191.                 {% if isHMRMode %}
  192.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-node.js" defer></script>
  193.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-shared.js" defer></script>
  194.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/runtime.js" defer></script>
  195.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/app.js" defer></script>
  196.                     {# The storefront entry is a combined entry point which contains all plugins & themes #}
  197.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/storefront.js" defer></script>
  198.                 {% else %}
  199.                     {% for file in theme_config('assets.js') %}
  200.                         <script type="text/javascript" src="{{ asset(file, 'theme') }}" defer></script>
  201.                     {% endfor %}
  202.                 {% endif %}
  203.             {% endblock %}
  204.         {% endif %}
  205.     </head>
  206. {% endblock %}