templates/areas/teaser-products/view.html.twig line 1

Open in your IDE?
  1. <section class="product-teaser-area container content-block {{ not pimcore_input('anchorTitle').isEmpty() ? 'js-anchor-nav__item' }}"
  2.     {% if not pimcore_input('anchorTitle').isEmpty() %} data-anchor-nav-title="{{ pimcore_input('anchorTitle').getData() }}" {% endif %}
  3. >
  4.     <div class="row">
  5.         <div class="col-md-8">
  6.             {{ include('includes/title-blocks/title-block.html.twig', {
  7.                 titleNews: true,
  8.             }) }}
  9.         </div>
  10.     </div>
  11.     {% if editmode %}
  12.         <div class="ms-auto">
  13.             {% embed 'includes/editmode-settings.html.twig' %}
  14.                 {% block additionalSettings %}
  15.                     {{ pimcore_relations('products', {
  16.                         "types": ["object"],
  17.                         "subtypes": {
  18.                             "object": ["object"]
  19.                         },
  20.                         "classes": ['Product', 'Forklift', 'MascusProduct'],
  21.                         "title": 'Product objects'
  22.                     }) }}
  23.                 {% endblock %}
  24.             {% endembed %}
  25.         </div>
  26.     {% endif %}
  27.     <div class="row gy-2">
  28.         {% for product in pimcore_relations('products') %}
  29.             <div class="col-md-4 col-xl-3">
  30.                 {% if product is instanceof('\\Pimcore\\Model\\DataObject\\Product') %}
  31.                     {% set teaserType = 'product' %}
  32.                 {% else %}
  33.                     {% set teaserType = product.className[:1]|lower ~ product.className[1:] %}
  34.                 {% endif %}
  35.                 {{ include('includes/teaser/products-teaser-'"#{teaserType}"'.html.twig', {
  36.                     'product': product,
  37.                 }) }}
  38.             </div>
  39.         {% endfor %}
  40.     </div>
  41. </section>