ソースを参照

Fix #110 Page not active in the navbar if output is not the default

Thanks to https://github.com/andreburgaud for investigating the issue
and submitting a patch.
Talha Mansoor 11 年 前
コミット
3c0be74d71
共有1 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 2 2
      templates/base.html

+ 2 - 2
templates/base.html

@@ -60,8 +60,8 @@
                         <ul class="nav pull-right top-menu">
                             <li {% if page_name == 'index' %} class="active"{% endif %}><a href="{{ SITEURL }}">Home</a></li>
                             {% if DISPLAY_PAGES_ON_MENU %}
-                            {% for page in pages %}
-                            <li {% if output_file == page.url %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
+                            {% for p in pages %}
+                            <li {% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
                             {% endfor %}
                             {% endif %}
                             <li {% if page_name == 'categories' %} class="active"{% endif %}><a href="{{ SITEURL }}/categories.html">Categories</a></li>