templates/Clubs/Category/view.html.twig line 1

Open in your IDE?
  1. {% for category in categories | sortbyfield('name') %}
  2.     {% if check_for_clubs_from_category(category, app.request.locale) %}
  3.         {% set img = (category.listImage) ? category.listImage | first : null %}
  4.         <li class="tile-menu-item"
  5.             data-label="{{ category.name }}" data-category="{{ category.id }}">
  6.             <a href="#">
  7.                 {{ category.name }}
  8.             </a>
  9.             {% if img is not null and img is not empty %}
  10.                 {% set fullSrc = croppedImgSrc(img.media.url, img.cropping, { w: 350, h: 350, q: 80, fit: 'crop' }) %}
  11.                 {% set previewSrc = croppedImgSrc(img.media.url, img.cropping, jml_img_large.preview) %}
  12.                 <figure class="tile-figure">
  13.                     <img class="lazy" src="{{ previewSrc }}" data-src="{{ fullSrc }}" alt="{{ category.name }}"/>
  14.                 </figure>
  15.             {% endif %}
  16.             <i class="tile-menu-bg {{ category.colorClass }}"></i>
  17.         </li>
  18.     {% endif %}
  19. {% endfor %}