diff options
author | Leonardo Giordani <giordani.leonardo@gmail.com> | 2014-10-28 11:49:17 +0100 |
---|---|---|
committer | Leonardo Giordani <giordani.leonardo@gmail.com> | 2014-10-28 11:49:17 +0100 |
commit | 228b474cdbf25303dac8e3a375efa4d5c8ab19ac (patch) | |
tree | 8ef5ad0194cd900ec1d53162ee9af8ee23e53f7a /pelican-bootstrap3 | |
parent | 4f930ce5f6691c452307f1c779168051e7024850 (diff) | |
download | pelican-themes-228b474cdbf25303dac8e3a375efa4d5c8ab19ac.zip pelican-themes-228b474cdbf25303dac8e3a375efa4d5c8ab19ac.tar.gz pelican-themes-228b474cdbf25303dac8e3a375efa4d5c8ab19ac.tar.bz2 |
Update pagination.html
This allows the theme to follow pagination specification through PAGINATION_PATTERNS. See Issue #265
Diffstat (limited to 'pelican-bootstrap3')
-rw-r--r-- | pelican-bootstrap3/templates/includes/pagination.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pelican-bootstrap3/templates/includes/pagination.html b/pelican-bootstrap3/templates/includes/pagination.html index 9ae4285..2627bb1 100644 --- a/pelican-bootstrap3/templates/includes/pagination.html +++ b/pelican-bootstrap3/templates/includes/pagination.html @@ -23,9 +23,10 @@ <li class="prev disabled"><a href="#">«</a></li> {% endif %} {% for num in range( 1, 1 + articles_paginator.num_pages ) %} + {% set page = articles_paginator.page(num) %} <li class="{{ 'active' if num == articles_page.number else '' }}"><a - href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">{{ num }}</a></li> - {% endfor %} + href="{{ SITEURL }}/{{ page.url }}">{{ num }}</a></li> + {% endfor %} {% if articles_page.has_next() %} <li class="next"><a href="{{ SITEURL }}/{{ articles_next_page.url }}">»</a></li> @@ -34,4 +35,4 @@ {% endif %} </ul> {% endif %} -{% endif %}
\ No newline at end of file +{% endif %} |