diff options
Diffstat (limited to 'pelican-bootstrap3')
-rw-r--r-- | pelican-bootstrap3/templates/base.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html index 9c292e6..6362e21 100644 --- a/pelican-bootstrap3/templates/base.html +++ b/pelican-bootstrap3/templates/base.html @@ -123,11 +123,16 @@ {% for title, link in MENUITEMS %} <li><a href="{{ link }}">{{ title }}</a></li> {% endfor %} + {% if not PAGES_SORT_ATTRIBUTE -%} + {% set PAGES_SORT_ATTRIBUTE = 'title' %} + {%- endif %} {% if DISPLAY_PAGES_ON_MENU %} - {% for p in pages %} + {% for p in pages | sort(attribute=PAGES_SORT_ATTRIBUTE) %} + {% if p.url %} <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}"> {{ p.menulabel|default(p.title) }} </a></li> + {% endif %} {% endfor %} {% endif %} {% if DISPLAY_CATEGORIES_ON_MENU %} |