custom/plugins/SasBlogModule/src/Resources/views/storefront/element/cms-element-blog-detail.html.twig line 1

Open in your IDE?
  1. {% block sas_blog_detail %}
  2.     {% if element.data %}
  3.         <article class="sas-blog-detail row"
  4.              itemprop="article"
  5.              itemscope
  6.              itemtype="https://schema.org/BlogPosting">
  7.             {% block sas_blog_detail_article_item_meta_published %}
  8.                 <meta itemprop="datePublished" content="{{ product.releaseDate|format_date(pattern="Y-MM-dd", locale=app.request.locale) }}"/>
  9.             {% endblock %}
  10.             {% block page_product_detail_review_item_info_date %}
  11.                 <div class="col-12 sas-blog-detail-item-date">
  12.                     <p><small>{{ element.data.publishedAt|format_date('short', locale=app.request.locale) }}</small></p>
  13.                 </div>
  14.             {% endblock %}
  15.             {% block sas_blog_detail_article_blocks %}
  16.                 <div class="col-12 sas-blog-detail-article">
  17.                     {% block sas_blog_detail_article_teaser_image %}
  18.                         {% if element.data.detailTeaserImage %}
  19.                             {% set attributes = {
  20.                                 'class': 'blog-image-teaser card-img-top mb-3',
  21.                                 'alt': (element.data.media.translated.alt ?: element.data.media.fileName),
  22.                                 'title': (element.data.media.translated.title ?: element.data.media.fileName)
  23.                             } %}
  24.                             {% sw_thumbnails 'blog-image-teaser' with {
  25.                                     media: element.data.media,
  26.                                     sizes: {
  27.                                     'xs': '501px',
  28.                                     'sm': '315px',
  29.                                     'md': '427px',
  30.                                     'lg': '333px',
  31.                                     'xl': '284px'
  32.                                 }
  33.                             } %}
  34.                         {% endif %}
  35.                     {% endblock %}
  36.                     {% block sas_blog_detail_article_title %}
  37.                         <h1 class="sas-blog-detail-title" itemprop="headline">
  38.                             {{ element.data.translated.title }}
  39.                         </h1>
  40.                     {% endblock %}
  41.                     {% block sas_blog_detail_article_meta %}
  42.                         {% if element.fieldconfig.elements.showAuthor.value or element.fieldconfig.elements.showCategory.value %}
  43.                             <div class="sas-blog-detail-article-meta">
  44.                                 {% block sas_blog_detail_article_meta_author %}
  45.                                     {% if element.fieldconfig.elements.showAuthor.value and element.data.author %}
  46.                                         {% sw_include '@Storefront/storefront/component/blog/_partials/_block_author.html.twig' with {
  47.                                             author: element.data.author
  48.                                         } %}
  49.                                     {% endif %}
  50.                                 {% endblock %}
  51.                                 {% block sas_blog_detail_article_meta_categories %}
  52.                                     {% if element.fieldconfig.elements.showCategory.value and element.data.blogCategories %}
  53.                                         {% sw_include '@Storefront/storefront/component/blog/_partials/_block_category.html.twig' with {
  54.                                             categories: element.data.blogCategories
  55.                                         } %}
  56.                                     {% endif %}
  57.                                 {% endblock %}
  58.                             </div>
  59.                         {% endif %}
  60.                     {% endblock %}
  61.                     {% block sas_blog_detail_article_blocks_content %}
  62.                         <div>
  63.                             {{ element.data.translated.content|raw }}
  64.                         </div>
  65.                     {% endblock %}
  66.                 </div>
  67.             {% endblock %}
  68.         </article>
  69.     {% else %}
  70.         {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  71.             type: "warning",
  72.             content: 'sas-blog.element.detail.warning.content'|trans,
  73.             heading: 'sas-blog.element.detail.warning.heading'|trans
  74.         } %}
  75.     {% endif %}
  76. {% endblock %}