Only display paginator if multiple pages.
This commit is contained in:
parent
cdf9c67b42
commit
f7425dc802
2 changed files with 2 additions and 4 deletions
|
@ -26,8 +26,7 @@
|
|||
{% if blog_entries.has_next %}<a class="next_page_button" href="?page={{ blog_entries.next_page_number }}{% if query_string %}&{{ query_string|escape }}{% endif %}">Next page (older) »</a>{% endif %}
|
||||
{% if blog_entries.has_previous %}<a href="?page={{ blog_entries.previous_page_number }}{% if query_string %}&{{ query_string|escape }}{% endif %}">« Previous page (newer)</a>{% endif %}
|
||||
</p>
|
||||
<p class="pagination_list">{% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}
|
||||
</p>
|
||||
<p class="pagination_list">{% if blog_entries.num_pages > 1 %} {% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p>
|
||||
<div class="clear"></div>
|
||||
|
||||
{% if date_list %}
|
||||
|
|
|
@ -31,8 +31,7 @@
|
|||
{% if news.has_next %}<a class="next_page_button" href="?page={{ news.next_page_number }}">Next page (older) »</a>{% endif %}
|
||||
{% if news.has_previous %}<a href="?page={{ news.previous_page_number }}">« Previous page (newer)</a>{% endif %}
|
||||
</p>
|
||||
<p class="pagination_list">{% for pagenum in news.paginator.page_range %}{% ifequal pagenum news.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}
|
||||
</p>
|
||||
<p class="pagination_list">{% if blog_entries.num_pages > 1 %} {% for pagenum in blog_entries.paginator.page_range %}{% ifequal pagenum blog_entries.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
|
Loading…
Reference in a new issue