From: Guillaume Jacquemin Date: Sun, 5 Jul 2020 11:12:05 +0000 (+0200) Subject: Update pagination Pelican template. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=4a8de7d3b1d9a0fb08a15317a97c11d2e3b9287d;p=blog.git Update pagination Pelican template. The template was hardcoded for the default reversed date ordering of articles. --- diff --git a/pelican-theme/templates/pagination.html b/pelican-theme/templates/pagination.html index 42a8dc5c..0674fe0a 100644 --- a/pelican-theme/templates/pagination.html +++ b/pelican-theme/templates/pagination.html @@ -1,7 +1,7 @@ {% if DEFAULT_PAGINATION %}
- {%- if articles_page.has_previous() %}« newer articles | {% endif -%} + {%- if articles_page.has_previous() %}« {% if ARTICLE_ORDER_BY == "date" %}older{% else %}newer{% endif %} articles | {% endif -%} page {{ articles_page.number }} - {%- if articles_page.has_next() %} | older articles »{% endif -%} + {%- if articles_page.has_next() %} | {% if ARTICLE_ORDER_BY == "date" %}newer{% else %}older{% endif %} articles »{% endif -%}
{% endif %}