custom/plugins/AmMacTrade/src/Resources/views/storefront/layout/meta.html.twig line 74

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 ?? 160, '…') %}
  6.     {% set metaTitle = metaInformation.metaTitle|striptags|trim %}
  7.     {% set metaKeywords = metaInformation.metaKeywords|striptags|trim %}
  8.  
  9.     <head>
  10.         {% block layout_head_meta_tags %}
  11.             {% block layout_head_meta_tags_charset %}
  12.                 <meta charset="utf-8">
  13.             {% endblock %}
  14.             {% block layout_head_meta_tags_viewport %}
  15.                 <meta name="viewport"
  16.                       content="width=device-width, initial-scale=1, shrink-to-fit=no">
  17.             {% endblock %}
  18.             {% block layout_head_meta_tags_general %}
  19.                 <meta name="author"
  20.                       content="{% block layout_head_meta_tags_general_author %}{{ metaInformation.author|striptags }}{% endblock %}"/>
  21.                 <meta name="robots"
  22.                       content="{% block layout_head_meta_tags_robots %}{{ metaInformation.robots }}{% endblock %}"/>
  23.                 <meta name="revisit-after"
  24.                       content="{% block layout_head_meta_tags_general_revisit %}{{ metaInformation.revisit|striptags }}{% endblock %}"/>
  25.                 <meta name="keywords"
  26.                       content="{% block layout_head_meta_tags_keywords %}{{ metaKeywords }}{% endblock %}"/>
  27.                 <meta name="description"
  28.                       content="{% block layout_head_meta_tags_description %}{{ metaDescription }}{% endblock %}"/>
  29.             {% endblock %}
  30.             {% block layout_head_meta_tags_opengraph %}
  31.                 <meta property="og:type"
  32.                       content="{% block layout_head_meta_tags_type_og %}website{% endblock %}"/>
  33.                 <meta property="og:site_name"
  34.                       content="{% block layout_head_meta_tags_sitename_og %}{{ basicConfig.shopName }}{% endblock %}"/>
  35.                 <meta property="og:title"
  36.                       content="{% block layout_head_meta_tags_title_og %}{{ metaTitle }}{% endblock %}"/>
  37.                 <meta property="og:description"
  38.                       content="{% block layout_head_meta_tags_description_og %}{{ metaDescription }}{% endblock %}"/>
  39.                 <meta property="og:image"
  40.                       content="{% block layout_head_meta_tags_image_og %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  41.                 <meta name="twitter:card"
  42.                       content="{% block layout_head_meta_tags_card_twitter %}summary{% endblock %}"/>
  43.                 <meta name="twitter:site"
  44.                       content="{% block layout_head_meta_tags_sitename_twitter %}{{ basicConfig.shopName }}{% endblock %}"/>
  45.                 <meta name="twitter:title"
  46.                       content="{% block layout_head_meta_tags_title_twitter %}{{ metaTitle }}{% endblock %}"/>
  47.                 <meta name="twitter:description"
  48.                       content="{% block layout_head_meta_tags_description_twitter %}{{ metaDescription }}{% endblock %}"/>
  49.                 <meta name="twitter:image"
  50.                       content="{% block layout_head_meta_tags_image_twitter %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  51.             {% endblock %}
  52.             {% block layout_head_meta_tags_schema_webpage %}
  53.                 <meta itemprop="copyrightHolder"
  54.                       content="{% block layout_head_meta_tags_copyright_holder %}{{ basicConfig.shopName }}{% endblock %}"/>
  55.                 <meta itemprop="copyrightYear"
  56.                       content="{% block layout_head_meta_tags_copyright_year %}{{ metaInformation.copyrightYear|striptags }}{% endblock %}"/>
  57.                 <meta itemprop="isFamilyFriendly"
  58.                       content="{% block layout_head_meta_tags_family_friendly %}{% if basicConfig.familyFriendly %}true{% else %}false{% endif %}{% endblock %}"/>
  59.                 <meta itemprop="image"
  60.                       content="{% block layout_head_meta_tags_image_meta %}{{ theme_config('sw-logo-desktop') }}{% endblock %}"/>
  61.             {% endblock %}
  62.             {% block layout_head_meta_tags_hreflangs %}
  63.                 {% for link in hrefLang %}
  64.                     <link rel="alternate" hreflang="{{ link.locale }}" href="{{ link.url }}" />
  65.                 {% endfor %}
  66.             {% endblock %}
  67.         {% endblock %}
  68.         {% block layout_head_favicon %}
  69.             <link rel="shortcut icon"
  70.                   href="{{ theme_config('sw-logo-favicon') }}">
  71.         {% endblock %}
  72.         {% block layout_head_apple %}
  73.             <link rel="apple-touch-icon"
  74.                   sizes="180x180"
  75.                   href="{{ theme_config('sw-logo-share') }}">
  76.         {% endblock %}
  77.         {% block layout_head_android %}
  78.             <link rel="icon"
  79.                   sizes="192x192"
  80.                   href="{{ theme_config('sw-logo-share') }}">
  81.             <meta name="theme-color"
  82.                   content="{{ theme_config('sw-color-brand-primary') }}"/>
  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.                 {% if context.salesChannel.Id === '45be9f42765d42e8ae1137d1812040f4' %}
  93.                     {{ 'header.title.cob'|trans|raw }}
  94.                 {% elseif context.salesChannel.Id === '4faca3b6a7f149cea7ade06ee340ce19' %}
  95.                     {{ 'header.title.benefitsme'|trans|raw }}
  96.                 {% else %}
  97.                     {{ metaTitle }}
  98.                 {% endif %}
  99.             {% endblock %}
  100.         {% endapply %}</title>
  101.     {% endblock %}
  102.         {% block layout_head_stylesheet %}
  103.             {% if isHMRMode %}
  104.                 {# CSS will be loaded from the JS automatically #}
  105.             {% else %}
  106.                 {% set assets = theme_config('assets.css') %}
  107.                 {% for file in assets %}
  108.                     <link rel="stylesheet"
  109.                       href="{{ asset(file, 'theme') }}">
  110.                 {% endfor %}
  111.             {% endif %}
  112.         {% endblock %}
  113.         {% block layout_head_javascript_feature %}
  114.             {% sw_include "@Storefront/storefront/component/feature.html.twig" %}
  115.         {% endblock %}
  116.         {# Block for tracking scripts which are required to include in the `head` section of the document #}
  117.         {% block layout_head_javascript_tracking %}
  118.             {% sw_include "@Storefront/storefront/component/analytics.html.twig" %}
  119.         {% endblock %}
  120.         {% if controllerName|lower == 'product' %}
  121.        {# <script>
  122.             (function () {
  123.                 var s = document.createElement('script');
  124.                 s.type = 'text/javascript';
  125.                 s.async = true;
  126.                 s.src = 'https://www.c2-circle.com/partner/static/mactrade/script.js';
  127.                 var x = document.getElementsByTagName('script')[0];
  128.                 x.parentNode.insertBefore(s, x);
  129.             })();
  130.         </script> #}
  131.         {% endif %}
  132.     </head>
  133. {% endblock %}