I have a pagination with Pagerfanta. I want to limit page numbers to 5, since on mobile version pagination is too large. I am using default view 'twitter_bootstrap_translated'.
{% if articles.haveToPaginate %}
<div class="pagination-class">
{{ pagerfanta(articles, 'twitter_bootstrap_translated', {routeName: 'search_result_paginated', routeParams: app.request.query.all}) }}
</div>
{% endif %}
How I can limit the page numbers/links?
Currently: < Prev | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ... 101 | Next >
I need pagination like this: Currently: < Prev | 1 | 2 | 3 | ... 101 | Next >