From 21d948a37823450285f16f1e7ea61521de8e6622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Steunou?= Date: Fri, 30 Aug 2013 16:03:06 +0200 Subject: [PATCH] fixes pagination include --- pelican/themes/notmyidea/templates/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pelican/themes/notmyidea/templates/index.html b/pelican/themes/notmyidea/templates/index.html index 2d45bb2a..8e065937 100644 --- a/pelican/themes/notmyidea/templates/index.html +++ b/pelican/themes/notmyidea/templates/index.html @@ -43,8 +43,9 @@ {% endif %} {% if loop.last %} - {% if loop.last and (articles_page.has_previous() - or not articles_page.has_previous() and loop.length > 1) %} + {% if loop.last and + ( (loop.length == DEFAULT_PAGINATION and articles_page.has_next()) or + (loop.length < DEFAULT_PAGINATION and articles_page.has_previous())) %} {% include 'pagination.html' %} {% endif %}