custom/plugins/Shopware-6-Blog-Plugin-1.5.8/src/Resources/views/storefront/layout/meta.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/meta.html.twig' %}
  2. {% if activeRoute == 'sas.frontend.blog.detail' and entry.media.url %}
  3.     {% set metaImage = entry.media.url|striptags|trim %}
  4. {% endif %}
  5. {% block layout_head_meta_tags %}
  6.     {% if activeRoute == 'sas.frontend.blog.detail' %}
  7.         <link rel="canonical" href="{{ seoUrl('sas.frontend.blog.detail', { articleId: entry.id }) }}"/>
  8.     {% endif %}
  9.     {{ parent() }}
  10. {% endblock %}
  11. {% block layout_head_meta_tags_image_og %}{{ metaImage ?? parent() }}{% endblock %}
  12. {% block layout_head_meta_tags_image_twitter %}{{ metaImage ?? parent() }}{% endblock %}
  13. {% block layout_head_meta_tags_image_meta %}{{ metaImage ?? parent() }}{% endblock %}
  14. {% block layout_head_meta_tags_schema_webpage %}
  15.     {{ parent() }}
  16.     {% if activeRoute == 'sas.frontend.blog.detail' %}
  17.         <script type="application/ld+json">
  18.             {
  19.                 "@context": "https://schema.org",
  20.                 "@type": "BlogPosting",
  21.                 "headline": "{{ entry.translated.title }}",
  22.                 "datePublished": "{{ entry.publishedAt|date }}",
  23.                 "dateModified": "{{ entry.updatedAt|date }}",
  24.                 "description": "{{ entry.translated.teaser }}",
  25.                 "author": {
  26.                     "@type": "Person",
  27.                     "name": "{{ entry.author.translated.name }}"
  28.                 },
  29.                 {% if entry.media.thumbnails.elements|length %}
  30.                 "image":[{% for item in entry.media.thumbnails.elements %}"{{ item.url }}"{{ loop.last ? '' : ',' }}{% endfor %}],{% endif %}
  31.                 "mainEntityOfPage": {
  32.                     "@type": "WebPage",
  33.                     "@id": "{{ seoUrl('sas.frontend.blog.detail', { articleId: entry.id }) }}"
  34.                 },
  35.                  "publisher": {
  36.                     "@type": "Organization",
  37.                     "name": "{{ shopware.config.core.basicInformation.shopName }}",
  38.                     "logo": {
  39.                         "@type": "ImageObject",
  40.                         "url": "{{ shopware.theme['sw-logo-desktop'] |sw_encode_url }}"
  41.                     }
  42.                 }
  43.             }
  44.         </script>
  45.     {% endif %}
  46. {% endblock %}