changeset 123:d8615f4b59e2

trail: use url_for() only for local items and item_href for remote items
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 14 Mar 2011 02:34:30 +0100
parents e90768ec963c
children 997d4a7c1b76
files MoinMoin/templates/layout.html
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/layout.html	Mon Mar 14 02:07:59 2011 +0100
+++ b/MoinMoin/templates/layout.html	Mon Mar 14 02:34:30 2011 +0100
@@ -86,15 +86,18 @@
     {% if trail_items %}
         <div id="moin-pagetrail">
         {% for wiki_name, item_name, item_href, exists, err in trail_items %}
-            <a href="{{ url_for('frontend.show_item', item_name=item_href) }}"{{ " " }}
             {%- if wiki_name -%}
-                title="{{ wiki_name }}"
-                class="{% if err %}moin-badinterwiki{% else %}interwiki{% endif %}"
+                <a href="{{ item_href }}"{{ " " }}
+                   title="{{ wiki_name }}"
+                   class="{% if err %}moin-badinterwiki{% else %}interwiki{% endif %}">
+                   {{ item_name|shorten_item_name }}
+                </a>
             {%- else -%}
-                {% if not exists -%}class="moin-nonexistent"{%- endif -%}
-            {%- endif %}>
-                {{ item_name|shorten_item_name }}
-            </a>
+                <a href="{{ url_for('frontend.show_item', item_name=item_name) }}"{{ " " }}
+                   {% if not exists -%}class="moin-nonexistent"{%- endif -%}>
+                   {{ item_name|shorten_item_name }}
+                </a>
+            {%- endif %}
             {% if not loop.last %}<span class="sep"> &raquo; </span>{% endif %}
         {% endfor %}
         </div>