Merge pull request #12 from stupergenius/dev/ben/fix_pagination
Fixes pagination links for non-default page configurations.
This commit is contained in:
commit
0553ee2619
1 changed files with 4 additions and 10 deletions
|
@ -1,20 +1,14 @@
|
|||
{% if DEFAULT_PAGINATION %}
|
||||
<div class="pagination">
|
||||
{% 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
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if articles_page.has_previous() %}
|
||||
{% if articles_page.previous_page_number() == 1 %}
|
||||
<a class="btn float-right" href="{{ SITEURL }}/{{ page_name }}.html">
|
||||
Newer Posts <i class="fa fa-angle-right"></i>
|
||||
</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 %}
|
||||
<a class="btn float-right" href="{{ SITEURL }}/{{ articles_previous_page.url }}">
|
||||
Newer Posts <i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue