lowercase 'PAGES' variable in template

Pages index/links were not appearing in the menu for whatever the value for {% if DISPLAY_PAGES_ON_MENU != False %} when the for loop was executed -> {% for p in PAGES %} | for a reason lowercase the variable name PAGES to pages works fine.
This commit is contained in:
Etienne Godin 2017-01-31 12:01:43 -05:00 committed by GitHub
parent 6bfeeef9bb
commit bca918196b

View File

@ -104,7 +104,7 @@
{% if DISPLAY_PAGES_ON_MENU != False %} {% if DISPLAY_PAGES_ON_MENU != False %}
<li class="uk-nav-header">Pages</li> <li class="uk-nav-header">Pages</li>
{% for p in PAGES %} {% for p in pages %}
<li {% if p == page %}class="uk-active"{% endif %}> <li {% if p == page %}class="uk-active"{% endif %}>
<a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a> <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
</li> </li>
@ -179,7 +179,7 @@
{% endfor %} {% endfor %}
{% if DISPLAY_PAGES_ON_MENU != False %} {% if DISPLAY_PAGES_ON_MENU != False %}
<li class="uk-nav-header">Pages</li> <li class="uk-nav-header">Pages</li>
{% for p in PAGES %} {% for p in pages %}
<li {% if p == page %}class="uk-active"{% endif %}> <li {% if p == page %}class="uk-active"{% endif %}>
<a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a> <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
</li> </li>