changeset 2470:9c21d0f23521

Fixes #69, by generating a new url for a show view and comparing nav. with this
author sharky93 <rishabhr123@gmail.com>
date Thu, 12 Sep 2013 19:46:08 +0530
parents a723ec19254b
children 63d9b1fd2428
files MoinMoin/themes/basic/templates/layout.html
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/templates/layout.html	Thu Sep 12 16:29:49 2013 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Thu Sep 12 19:46:08 2013 +0530
@@ -10,6 +10,7 @@
 {% set current_url = url_for(request.endpoint) %}
 {% else %}
 {% set current_url = url_for_item(endpoint = request.endpoint, item_name = item_name) %}
+{% set current_url_showview = url_for_item(endpoint='frontend.show_item', item_name=item_name) %}
 {% endif %}
 
 {# Helper macro to generate the local panel #}
@@ -181,7 +182,11 @@
 
                             <div class="list-group-item moin-list-heading"> {{ _("Site Navigation") }} </div>
                             {% for cls, url, text, title in navibar_items if cls != 'userlink' %}
-                                <a class="list-group-item {{ cls }}{% if url == current_url %} active{% endif %}" href="{{ url }}" {% if title %}title="{{ title }}"{% endif %}>{{ text|shorten_item_name }}</a>
+                                <a class="list-group-item {{ cls }}
+                                    {% if url in [current_url, current_url_showview] %} active{% endif %}" href="{{ url }}" 
+                                    {% if title %}title="{{ title }}"{% endif %}>
+                                    {{ text|shorten_item_name }}
+                                </a>
                             {% endfor %}
                             
                             {% if item_navigation %}