]> git.parisson.com Git - mezzo.git/commitdiff
Breadcrumb small fix
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Thu, 29 Sep 2016 09:21:06 +0000 (11:21 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Thu, 29 Sep 2016 09:21:06 +0000 (11:21 +0200)
app/templates/pages/menus/breadcrumb.html

index f7c3c2fbef5e50f96b9b56a86e2eb6a0a95efdaa..bf40eaf884517fca61b4f3bcb19acbf658fb8466 100644 (file)
@@ -1,27 +1,31 @@
 {% load i18n pages_tags %}
 
 {% if on_home %}
-<li>{% trans "Home" %}</li>
+    <li>{% trans "Home" %}</li>
 {% else %}
-{% for page in page_branch %}
+    {% for page in page_branch %}
 
-    {% if not has_home and page.is_primary and forloop.first %}
-    <li class="breadcrumb__item" id="breadcrumb-menu-home">
-        <a class="breadcrumb__link" href="{% url "home" %}">{% trans "Home" %}</a>
-    </li>
-    {% endif %}
+        {% if not has_home and page.is_primary and forloop.first %}
+            <li class="breadcrumb__item" id="breadcrumb-menu-home">
+                <a class="breadcrumb__link" href="{% url "home" %}">{% trans "Home" %}</a>
+            </li>
+        {% endif %}
 
-    {% if page.is_current_or_ascendant %}
-    {% if page.is_current %}
-    <li class="breadcrumb__item" id="breadcrumb-menu-{{ page.html_id }}"
-        class="active">{{ page.title }}</li>
-    {% else %}
-    <li class="breadcrumb__item" id="breadcrumb-menu-{{ page.html_id }}">
-        <a class="breadcrumb__link" href="{{ page.get_absolute_url }}">{{ page.title }}</a>
-    </li>
-    {% endif %}
-    {% if page.has_children %}{% page_menu page %}{% endif %}
-    {% endif %}
+        {% if page.is_current_or_ascendant %}
+            {% if page.is_current %}
+                <li class="breadcrumb__item" id="breadcrumb-menu-{{ page.html_id }}"
+                    class="active">{{ page.title }}</li>
+            {% else %}
+                <li class="breadcrumb__item" id="breadcrumb-menu-{{ page.html_id }}">
+                    <a class="breadcrumb__link" href="{{ page.get_absolute_url }}">{{ page.title }}</a>
+                </li>
+            {% endif %}
+            {% if page.has_children %}
+                {% page_menu page %}
+            {% else %}
+                
+            {% endif %}
+        {% endif %}
 
-{% endfor %}
+    {% endfor %}
 {% endif %}