Correct navigation links.
Earlier commit incorrectly implemented navigation link suppression when only one page present, such that this was never shown. This is now corrected herein.
This commit is contained in:
parent
9d654d08ee
commit
9c090f2c27
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +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">{% if blog_entries.paginator.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>
|
||||
{% if blog_entries.paginator.num_pages > 1 %}<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>{% endif %}
|
||||
<div class="clear"></div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -31,7 +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">{% if news.paginator.num_pages > 1 %} {% for pagenum in news.paginator.page_range %}{% ifequal pagenum news.number %}[{{ pagenum }}]{% else %}<a href="?page={{ pagenum }}">{{ pagenum }}</a>{% endifequal %} {% endfor %}{% endif %}</p>
|
||||
{% if news.paginator.num_pages > 1 %}<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>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
|
Loading…
Reference in a new issue