Skip to content

Commit 21f82cc

Browse files
committed
feature #419 Don't show a pagination when there is only one page (voronkovich)
This PR was merged into the master branch. Discussion ---------- Don't show a pagination when there is only one page Commits ------- 60f796e Don't show a pagination when there is only one page
2 parents 949cc64 + 60f796e commit 21f82cc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/Resources/views/blog/index.html.twig

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
<div class="well">{{ 'post.no_posts_found'|trans }}</div>
1818
{% endfor %}
1919

20-
<div class="navigation text-center">
21-
{{ pagerfanta(posts, 'twitter_bootstrap3_translated', { routeName: 'blog_index_paginated' }) }}
22-
</div>
20+
{% if posts.haveToPaginate %}
21+
<div class="navigation text-center">
22+
{{ pagerfanta(posts, 'twitter_bootstrap3_translated', { routeName: 'blog_index_paginated' }) }}
23+
</div>
24+
{% endif %}
2325
{% endblock %}
2426

2527
{% block sidebar %}

0 commit comments

Comments
 (0)