diff options
author | Blake Griffith <blake.a.griffith@gmail.com> | 2015-02-25 17:36:07 -0800 |
---|---|---|
committer | Blake Griffith <blake.a.griffith@gmail.com> | 2015-02-25 17:40:33 -0800 |
commit | 8831812ca3d2d2df9dbb6f6ca84c179702abc720 (patch) | |
tree | 1f651d914ba85ac582fb0255194693cd3dc04a98 /notmyidea-cms | |
parent | 33a884350cb8eae48a278ae4504bc1c275a3c780 (diff) | |
download | pelican-themes-8831812ca3d2d2df9dbb6f6ca84c179702abc720.tar.gz |
Adds "activeness" that happens w/ normal menu
When `MENUITEMS` it makes the current page active in the menu. The same way it does when the menu is built the default way.
Diffstat (limited to 'notmyidea-cms')
-rw-r--r-- | notmyidea-cms/templates/base.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/notmyidea-cms/templates/base.html b/notmyidea-cms/templates/base.html index a782e50..4d92ec2 100644 --- a/notmyidea-cms/templates/base.html +++ b/notmyidea-cms/templates/base.html @@ -27,8 +27,10 @@ <header id="banner" class="body"> <h1><a href="{{ SITEURL }}/index.html">{{ SITENAME }} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a></h1> <nav><ul> - {% for title, link in MENUITEMS %} - <li><a href="{{ link }}">{{ title }}</a></li> + {% for title, url in MENUITEMS %} + <li {% if page is defined and url == page.url %} class="active" {% endif %}> + <a href="{{ SITEURL }}/{{ url }}">{{ title }}</a> + </li> {% endfor %} {% if DISPLAY_PAGES_ON_MENU != False %} {% for p in PAGES %} |