templates/front/catalog/product/list.html.twig line 1

Open in your IDE?
  1. {% if titleTag is not defined %}
  2. {% set titleTag = 'div' %}
  3. {% endif %}
  4. {% if showFilter is not defined %}
  5. {% set showFilter = true %}
  6. {% endif %}
  7. {% set filterForm = (productCount is defined) or (filters is defined and filters) %}
  8. <div class="product-list-ctn {%if listClass is defined%}{{ listClass }}{% endif %}">
  9. {% if showFilter %}
  10. <div class="product-list-header">
  11. {% if filterForm %}
  12. <form class="product-selection collapse" {% if filterUrl is defined %}action="{{ filterUrl }}"{% endif %}>
  13. {% endif %}
  14. {% if productCount is defined %}
  15. <div class="sort">
  16. {# <label for="list-sort">{% trans %}trier par :{% endtrans %}</label>#}
  17. {% if sort is not defined %}
  18. {% set sort = '' %}
  19. {% endif %}
  20. <select name="sort" id="list-sort" class="select2" data-placeholder="{% trans %}Trier par {% endtrans %}">
  21. <option value="" {% if sort == '' %}selected{% endif %}>{% trans %}Trier par {% endtrans %} :</option>
  22. <option value="name-asc" {% if sort == 'name-asc' %}selected{% endif %}>{% trans %}Nom{% endtrans %}</option>
  23. <option value="price-asc" {% if sort == 'price-asc' %}selected{% endif %}>{% trans %}Prix croissant{% endtrans %}</option>
  24. <option value="price-desc" {% if sort == 'price-desc' %}selected{% endif %}>{% trans %}Prix décroissant{% endtrans %}</option>
  25. </select>
  26. </div>
  27. {% endif %}
  28. {% if filters is defined and filters %}
  29. {% include 'front/catalog/category/filter.html.twig' %}
  30. {% endif %}
  31. {% if filterForm %}
  32. </form>
  33. {% endif %}
  34. </div>
  35. {% endif %}
  36. {% if title is defined and title %}
  37. <div class="title-ctn">
  38. <{{ titleTag }} class="title">{{ title }}</{{ titleTag }}>
  39. <hr>
  40. </div>
  41. {% endif %}
  42. {% include 'front/catalog/product/view/list.html.twig' with {products:products} %}
  43. {% if nbPages is defined %}
  44. <div class="pagination-ctn">
  45. {% include 'front/catalog/product/pagination.html.twig' with {nbPages:nbPages, page:page} %}
  46. </div>
  47. {% endif %}
  48. </div>