templates/includes/teaser/products-teaser-mascusProduct.html.twig line 1

Open in your IDE?
  1. {% set product = product|default(null) %}
  2. <article class="product-teaser shadow stretch-link border-radius-4">
  3.     <div class="product-teaser__container-img">
  4.         <div class="ratio ratio-4x3">
  5.             {% if product.imageGallery.items %}
  6.                 {{ product.imageGallery.items[0].getThumbnail('product-teaser').getHTML({
  7.                     imgAttributes: {
  8.                         'class': 'ratio-item js-lazy-img product-teaser__img'
  9.                     },
  10.                     'lowQualityPlaceholder': true,
  11.                 })|raw }}
  12.             {% endif %}
  13.         </div>
  14.     </div>
  15.     <div class="product-teaser__content">
  16.         <div class="d-flex flex-column">
  17.             <span class="product-teaser__title">{{ 'product.teaser.Model'|trans }}</span>
  18.             <span class="product-teaser__data product-teaser__data--bold">{{ product.model }}</span>
  19.         </div>
  20.         {% if product.yearOfManufacture != '' or product.meterReadOutHours != '' %}
  21.             <div class="product-teaser__container d-flex">
  22.                 {% if product.yearOfManufacture != '' %}
  23.                     <div class="d-flex flex-column">
  24.                         <span class="product-teaser__title">{{ 'product.detail.YearOfConstruction'|trans }}</span>
  25.                         <span class="product-teaser__data">{{ product.yearOfManufacture }}</span>
  26.                     </div>
  27.                 {% endif %}
  28.                 {% if product.meterReadOutHours != '' %}
  29.                     <div class="product-teaser__info-right d-flex flex-column">
  30.                         <span class="product-teaser__title">{{ 'product.detail.OperatingHours'|trans }}</span>
  31.                         <span class="product-teaser__data">{{ product.meterReadOutHours }}</span>
  32.                     </div>
  33.                 {% endif %}
  34.             </div>
  35.         {% endif %}
  36.         <div class="product-teaser__container-link d-flex">
  37.             <a class="text-gradient-primary product-teaser__category">{{ product.category.displayTitle ?: product.category.title }}</a>
  38.             <a href="{{ linkGenerator(product) }}"
  39.                class="btn btn-dark stretch-link__link"
  40.                data-event-tracking-event="select_product"
  41.                data-event-tracking-product_brand="{{ product.brand.title ?: product.brand.internalBrandName }}"
  42.                data-event-tracking-product_variant="{{ product.model }}"
  43.                data-event-tracking-product_category="{{ product.category.displayTitle ?: product.category.title }}"
  44.                data-event-tracking-link_url="{{ elements_host_url() ~ linkGenerator(product) }}">
  45.                 {{ 'product.teaser.Detail'|trans }}
  46.             </a>
  47.         </div>
  48.     </div>
  49. </article>