Quellcode durchsuchen

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 vor 11 Jahren
Ursprung
Commit
3c0be74d71
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  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>