{% extends 'base_catalog.html.twig' %}
{% block side_menu %}
{% endblock side_menu %}
{% block real_content %}
{{ include ('entreprise/product_raw_list_1.html.twig') }}
{% if pageAmount > 1 %}
<div>
<div class="pt-4 pb-5 mb-4">
<!-- Pagination-->
<nav class="d-flex justify-content-between pt-2" aria-label="Page navigation">
{% set preview = currentPage - 1 %}
{% set next = currentPage + 1 %}
{% if currentPage > 1 %}
<ul class="pagination">
<li class="page-item"><a class="page-link" href="{{ path('product_by_category', {'slug': category.slug, 'page':'page', 'currentPage': preview}) }}"><i class="czi-arrow-left mr-2"></i>Prev</a></li>
</ul>
{% endif %}
<ul class="pagination">
<li class="page-item d-sm-none"><span class="page-link page-link-static">1 / {{ pageAmount }}</span></li>
{% for i in range(1, pageAmount) %}
<li class="page-item {% if i == currentPage %} active{% endif %} d-none d-sm-block"><a class="page-link" href="{{ path('product_by_category', {'slug': category.slug, 'page':'page', 'currentPage': i}) }}">{{ i }}</a></li>
{% endfor %}
</ul>
{% if currentPage < pageAmount %}
<ul class="pagination">
<li class="page-item"><a class="page-link" href="{{ path('product_by_category', {'slug': category.slug, 'page':'page', 'currentPage': next}) }}" aria-label="Next">Next<i class="czi-arrow-right ml-2"></i></a></li>
</ul>
{% endif %}
</nav>
</div>
</div>
{% endif %}
{% endblock real_content %}