{% if currentPath is not defined %}{% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}{% endif %}{% if (nbPages is defined) and (nbPages > 1) %}<div class="pagination" data-page="{{ app.request.get('page', 1) }}" data-nb="{{ nbPages }}"><a class="button add-page"><img src="/img/loading.gif" /><span>Plus de produit</span></a><div class="pages">{% for i in 1..nbPages %}{% set paginPath = currentPath %}{% if i > 1 %}{% set paginPath = currentPath ~ '?page=' ~ i %}{% endif %}<a href="{{ paginPath }}" class="{% if i == page %}on{% endif %}" data-page="{{ i }}">{{ i }}</a>{% endfor %}</div></div>{% endif %}