vendor/store.shopware.com/moorlcmstestimonial/src/Resources/views/storefront/element/cms-element-testimonial-listing.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/element/cms-element-moorl-foundation-listing.html.twig' %}
  2. {# Just define item layouts here #}
  3. {% block moorl_foundation_listing_item %}
  4.     {% set itemContent %}
  5.         <div class="moorl-listing-item-{{ config.itemLayout.value }}">
  6.             {% block moorl_testimonial_item %}
  7.                 <div class="cms-element-testimonial-listing-item">
  8.                     <div class="" style="{{ contentCss|join(';') }}">
  9.                         {% block moorl_testimonial_item_inner %}
  10.                             {% block moorl_testimonial_item_avatar %}
  11.                                 {% if item.avatar.url %}
  12.                                     {% sw_thumbnails 'moorl-listing-item-image-thumbnails' with {
  13.                                         media: item.avatar,
  14.                                         attributes: {
  15.                                             'alt': title,
  16.                                             'class': "is-#{config.displayMode.value}"
  17.                                         }
  18.                                     } %}
  19.                                 {% else %}
  20.                                     {% sw_icon 'placeholder' style {
  21.                                         'size': 'fluid'
  22.                                     } %}
  23.                                 {% endif %}
  24.                             {% endblock %}
  25.                             {% block moorl_testimonial_item_rating %}
  26.                                 {% if item.ratingMax > 0 %}
  27.                                     <div class="rating">
  28.                                         {% for i in 1..item.ratingMax %}
  29.                                             {% if item.rating >= i %}
  30.                                                 {% sw_icon 'star' style {pack:'fas'} %}
  31.                                             {% else %}
  32.                                                 {% sw_icon 'star' style {pack:'far'} %}
  33.                                             {% endif %}
  34.                                         {% endfor %}
  35.                                     </div>
  36.                                 {% endif %}
  37.                             {% endblock %}
  38.                             {% block moorl_testimonial_item_blockquote %}
  39.                                 <blockquote class="{% if config.showQuotes.value %}show-quotes{% endif %}">
  40.                                     {{ item.translated.teaser }}
  41.                                 </blockquote>
  42.                             {% endblock %}
  43.                             {% block moorl_testimonial_item_name %}
  44.                                 <h3>{{ item.translated.name }} <span>{{ item.translated.role }}</span></h3>
  45.                             {% endblock %}
  46.                         {% endblock %}
  47.                     </div>
  48.                 </div>
  49.             {% endblock %}
  50.         </div>
  51.     {% endset %}
  52.     <li class="{{ listingColumns }}">
  53.         {% if item.link %}
  54.             <a itemprop="mainEntityOfPage" href="{{ item.link }}" {% if config.urlNewTab.value %}target="_blank"
  55.                rel="noopener"{% endif %}
  56.                class="moorl-listing-item-wrapper{% if config.itemHasBorder.value %} has-border{% endif %}"
  57.                style="{{ itemCss|join(';')|raw }}"
  58.                title="{{ title }}">
  59.                 {{ itemContent }}
  60.             </a>
  61.         {% else %}
  62.             <div class="moorl-listing-item-wrapper{% if config.itemHasBorder.value %} has-border{% endif %}"
  63.                  style="{{ itemCss|join(';')|raw }}">
  64.                 {{ itemContent }}
  65.             </div>
  66.         {% endif %}
  67.     </li>
  68. {% endblock %}