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 filters is defined and filters %}
  15. {% include 'front/catalog/category/filter.html.twig' %}
  16. {% endif %}
  17. {% if productCount is defined %}
  18. <div class="sort">
  19. {# <label for="list-sort">{% trans %}trier par :{% endtrans %}</label>#}
  20. {% if sort is not defined %}
  21. {% set sort = '' %}
  22. {% endif %}
  23. <select name="sort" id="list-sort" class="select2" data-placeholder="{% trans %}Trier par {% endtrans %}">
  24. <option value="" {% if sort == '' %}selected{% endif %}>{% trans %}Trier par {% endtrans %} :</option>
  25. <option value="name-asc" {% if sort == 'name-asc' %}selected{% endif %}>{% trans %}Nom{% endtrans %}</option>
  26. <option value="price-asc" {% if sort == 'price-asc' %}selected{% endif %}>{% trans %}Prix croissant{% endtrans %}</option>
  27. <option value="price-desc" {% if sort == 'price-desc' %}selected{% endif %}>{% trans %}Prix décroissant{% endtrans %}</option>
  28. </select>
  29. </div>
  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>