custom/plugins/ZOGIcustom/src/Resources/views/storefront/layout/meta.html.twig line 1

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.             {% block layout_head_meta_tags_hreflangs %}
  64.                 {% for link in hrefLang %}
  65.                     <link rel="alternate" hreflang="{{ link.locale }}" href="{{ link.url }}" />
  66.                 {% endfor %}
  67.             {% endblock %}
  68.         {% endblock %}
  69.         {% block layout_head_favicon %}
  70.             <link rel="shortcut icon"
  71.                   href="{{ theme_config('sw-logo-favicon') }}">
  72.         {% endblock %}
  73.         {% block layout_head_apple %}
  74.             {% if theme_config('sw-logo-share') %}
  75.             <link rel="apple-touch-icon"
  76.                   sizes="180x180"
  77.                   href="{{ theme_config('sw-logo-share') }}">
  78.             {% endif %}
  79.         {% endblock %}
  80.         {% block layout_head_android %}
  81.             {# @deprecated tag:v6.5.0 - Use the block above, "layout_head_apple", instead #}
  82.         {% endblock %}
  83.         {% block layout_head_canonical %}
  84.             {% if page.metaInformation.canonical %}
  85.                 <link rel="canonical" href="{{ page.metaInformation.canonical }}" />
  86.             {% endif %}
  87.         {% endblock %}
  88.         {% block layout_head_title %}
  89.             <title itemprop="name">{% apply spaceless %}
  90.                 {% block layout_head_title_inner %}
  91.                     {{ metaTitle }}
  92.                 {% endblock %}
  93.             {% endapply %}</title>
  94.         {% endblock %}
  95.         {% block layout_head_stylesheet %}
  96.             {% if isHMRMode %}
  97.                 {# CSS will be loaded from the JS automatically #}
  98.             {% else %}
  99.                 {% set assets = theme_config('assets.css') %}
  100.                 {% for file in assets %}
  101.                     <link rel="stylesheet"
  102.                       href="{{ asset(file, 'theme') }}">
  103.                 {% endfor %}
  104.             {% endif %}
  105.         {% endblock %}
  106.         {% block layout_head_javascript_feature %}
  107.             {% sw_include "@Storefront/storefront/component/feature.html.twig" %}
  108.         {% endblock %}
  109.         {# Block for tracking scripts which are required to include in the `head` section of the document #}
  110.         {% block layout_head_javascript_tracking %}
  111.             {% sw_include "@Storefront/storefront/component/analytics.html.twig" %}
  112.         {% endblock %}
  113.         {% block layout_head_javascript_recaptcha %}
  114.             {% sw_include "@Storefront/storefront/component/recaptcha.html.twig" %}
  115.         {% endblock %}
  116.         {% block layout_head_javascript_token %}
  117.         {% endblock %}
  118.         {% if config('core.basicInformation.useDefaultCookieConsent') %}
  119.             {% block layout_head_javascript_cookie_state %}
  120.                 <script>
  121.                     window.useDefaultCookieConsent = true;
  122.                 </script>
  123.             {% endblock %}
  124.         {% endif %}
  125.         
  126.                     {% block zendesk_javascript %}
  127.                     
  128.             {#
  129.             <!--Start of Zendesk Chat Script-->
  130. <script type="text/javascript">
  131. window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s=
  132. d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set.
  133. _.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute("charset","utf-8");
  134. $.src="https://v2.zopim.com/?5ylqSzYWcKZvpPwFYL4i0oeTttcVgijN";z.t=+new Date;$.
  135. type="text/javascript";e.parentNode.insertBefore($,e)})(document,"script");
  136. </script>
  137. <!--End of Zendesk Chat Script-->
  138. #}
  139.  {% endblock %}
  140.         {% if feature('FEATURE_NEXT_15917') %}
  141.             {% block layout_head_javascript_router %}
  142.                 {# Register all routes that will be needed in JavaScript to the window.router object #}
  143.                 <script>
  144.                     window.activeNavigationId = '{{ page.header.navigation.active.id }}';
  145.                     window.router = {
  146.                         'frontend.cart.offcanvas': '{{ path('frontend.cart.offcanvas') }}',
  147.                         'frontend.cookie.offcanvas': '{{ path('frontend.cookie.offcanvas') }}',
  148.                         'frontend.checkout.finish.page': '{{ path('frontend.checkout.finish.page') }}',
  149.                         'frontend.checkout.info': '{{ path('frontend.checkout.info') }}',
  150.                         'frontend.menu.offcanvas': '{{ path('frontend.menu.offcanvas') }}',
  151.                         'frontend.cms.page': '{{ path('frontend.cms.page') }}',
  152.                         'frontend.cms.navigation.page': '{{ path('frontend.cms.navigation.page') }}',
  153.                         'frontend.account.addressbook': '{{ path('frontend.account.addressbook') }}',
  154.                         'frontend.csrf.generateToken': '{{ path('frontend.csrf.generateToken') }}',
  155.                         'frontend.country.country-data': '{{ path('frontend.country.country.data') }}',
  156.                         'frontend.store-api.proxy': '{{ path('frontend.store-api.proxy') }}',
  157.                     };
  158.                     window.storeApiProxyToken = '{{ sw_csrf("frontend.store-api.proxy", {"mode": "token"}) }}';
  159.                     window.salesChannelId = '{{ app.request.attributes.get('sw-sales-channel-id') }}';
  160.                 </script>
  161.             {% endblock %}
  162.             {% block layout_head_javascript_breakpoints %}
  163.                 {# Register the available viewport breakpoints the window.breakpoints object #}
  164.                 <script>
  165.                     {% set breakpoint = {
  166.                         'xs': theme_config('breakpoint.xs'),
  167.                         'sm': theme_config('breakpoint.sm'),
  168.                         'md': theme_config('breakpoint.md'),
  169.                         'lg': theme_config('breakpoint.lg'),
  170.                         'xl': theme_config('breakpoint.xl')
  171.                     } %}
  172.                     window.breakpoints = {{ breakpoint|json_encode()|raw }};
  173.                 </script>
  174.             {% endblock %}
  175.             {% block layout_head_javascript_csrf %}
  176.                 <script>
  177.                     window.csrf = {
  178.                         'enabled': '{{ shopware.csrfEnabled }}',
  179.                         'mode': '{{ shopware.csrfMode }}'
  180.                     }
  181.                 </script>
  182.             {% endblock %}
  183.             {% if config('core.cart.wishlistEnabled') %}
  184.                 {% block layout_head_javascript_wishlist_state %}
  185.                     <script>
  186.                         window.customerLoggedInState = {{ context.customer is not null and not context.customer.guest ? 1 : 0 }};
  187.                         window.wishlistEnabled = {{ config('core.cart.wishlistEnabled') }};
  188.                     </script>
  189.                 {% endblock %}
  190.             {% endif %}
  191.             {# @internal tag:v6.5.0 - jQuery will be removed from the core. This block can be used to add jQuery as a `<script>`. #}
  192.             {% block layout_head_javascript_jquery %}
  193.             {% endblock %}
  194.             {% block layout_head_javascript_hmr_mode %}
  195.                 {% if isHMRMode %}
  196.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-node.js" defer></script>
  197.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-shared.js" defer></script>
  198.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/runtime.js" defer></script>
  199.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/app.js" defer></script>
  200.                     {# The storefront entry is a combined entry point which contains all plugins & themes #}
  201.                     <script type="text/javascript" src="/_webpack_hot_proxy_/js/storefront.js" defer></script>
  202.                 {% else %}
  203.                     {% for file in theme_config('assets.js') %}
  204.                         <script type="text/javascript" src="{{ asset(file, 'theme') }}" defer></script>
  205.                     {% endfor %}
  206.                 {% endif %}
  207.             {% endblock %}
  208.         {% endif %}
  209.     </head>
  210. {% endblock %}