From 4fa97403d9e3ebab434ad223ad4da01e76a517ea Mon Sep 17 00:00:00 2001 From: Alasdair Nicol Date: Wed, 4 Jan 2017 00:43:12 +0000 Subject: [PATCH] PAGES context variable is replaced by pages in Pelican 3.7 By using 'or' in the if statement, we can support Pelican 3.7 and earlier versions in the same theme. When we are ready to drop support for Pelican <3.7, the if statement can be simplified. See the following links for more information. http://docs.getpelican.com/en/3.7.0/changelog.html#id1 http://docs.getpelican.com/en/3.7.0/faq.html#since-i-upgraded-pelican-my-pages-are-no-longer-rendered --- templates/base.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index bdbda51..0b2a42c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -120,7 +120,8 @@ {% endfor %} {% if DISPLAY_PAGES_ON_MENU %} - {% for p in PAGES %} + {# FIXME: Simplify to 'for p in pages' when we are ready to drop support for Pelican < 3.7 #} + {% for p in PAGES or pages %} {{ p.title }} {% endfor %} {% else %}