themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Brand/Box/_content.html.twig line 1

Open in your IDE?
  1. <div class="h-100 border border-pink">
  2.     {% if brand.images|first != false %}
  3.         {% set path = brand.images|first.path|imagine_filter(filter|default('sylius_shop_product_thumbnail')) %}
  4.         {% if brand.images.first.alt is defined %}
  5.             {% set alt = brand.images.first.alt %}
  6.         {% else %}
  7.             {% set alt = brand.name %}
  8.         {% endif %}
  9.     {% else %}
  10.         {% set path = asset('images/spacer.png') %} 
  11.          {% set alt = brand.name %}
  12.     {% endif %}
  13.     <div>
  14.         <img src="{{ path }}" {{ sylius_test_html_attribute('main-image') }} alt="{{ alt }}" class="w-100" />
  15.     </div>
  16.     <div class="p-2 bg-primary-site text-white text-center">
  17.         <h3 class="libelle-brand text-white"> {{ brand.name  }} </h3>
  18.         {% set totalProductBrand = app_get_total_product_by_brand(brand) %}
  19.         <span  class="d-block">{{ (totalProductBrand|length) }} article(s)</span>
  20.     </div>
  21. </div>