{% if pageCount > 1 %}
<div class="col mt-3 d-flex justify-content-center">
<nav aria-label="Page navigation example">
<ul class="pagination">
{% if previous is defined %}
<li class="page-item">
<a class="page-link" tabindex="-1" href="{{ path(route, query|merge({(pageParameterName): previous})) }}">Précédent</a>
</li>
{%else%}
<li class="page-item disabled">
<a class="page-link" tabindex="-1" href="">Précédent</a>
</li>
{% endif %}
{% for page in pagesInRange %}
{% if page != current %}
<li class="page-item">
<a class="page-link" href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
</li>
{% else %}
<li class="page-item active">
<a class="page-link" href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
</li>
{% endif %}
{% endfor %}
{% if next is defined %}
<li class="page-item">
<a class="page-link" href="{{ path(route, query|merge({(pageParameterName): next})) }}">Suivant</a>
</li>
{%else%}
<li class="page-item disabled">
<a class="page-link" href="">Suivant</a>
</li>
{% endif %}
</ul>
</nav>
</div>
{% endif %}