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