diff options
author | Justin Mayer <entroP@gmail.com> | 2015-03-02 09:23:27 -0700 |
---|---|---|
committer | Justin Mayer <entroP@gmail.com> | 2015-03-02 09:23:27 -0700 |
commit | d87478e4d6d24f7c7e7e86aafdb897326c14e2c6 (patch) | |
tree | 19c5b94a19392b1ac7afd2d2c49af2519bbeb861 | |
parent | 72ebad7b5838d36579ec8a30898aa8308619c1a3 (diff) | |
parent | 8831812ca3d2d2df9dbb6f6ca84c179702abc720 (diff) | |
download | pelican-themes-d87478e4d6d24f7c7e7e86aafdb897326c14e2c6.tar.gz |
Merge pull request #290 from cowlicks/patch-2
Highlight active menu item in notmyidea-cms theme
-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 %} |