vendor/store.shopware.com/sasblogmodule/src/Resources/views/storefront/layout/meta.html.twig line 1

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