Fixes pagination links for non-default page configurations.

This commit is contained in:
Ben Snider 2015-11-01 08:59:01 -07:00
parent d18f2c5cf5
commit f4e170c273

View file

@ -1,20 +1,14 @@
{% if DEFAULT_PAGINATION %} {% if DEFAULT_PAGINATION %}
<div class="pagination"> <div class="pagination">
{% if articles_page.has_next() %} {% if articles_page.has_next() %}
<a class="btn" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html"> <a class="btn" href="{{ SITEURL }}/{{ articles_next_page.url }}">
<i class="fa fa-angle-left"></i> Older Posts <i class="fa fa-angle-left"></i> Older Posts
</a> </a>
{% endif %} {% endif %}
{% if articles_page.has_previous() %} {% if articles_page.has_previous() %}
{% if articles_page.previous_page_number() == 1 %} <a class="btn float-right" href="{{ SITEURL }}/{{ articles_previous_page.url }}">
<a class="btn float-right" href="{{ SITEURL }}/{{ page_name }}.html"> Newer Posts <i class="fa fa-angle-right"></i>
Newer Posts <i class="fa fa-angle-right"></i> </a>
</a>
{% else %}
<a class="btn float-right" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">
Newer Posts <i class="fa fa-angle-right"></i>
</a>
{% endif %}
{% endif %} {% endif %}
</div> </div>
{% endif %} {% endif %}