Navigation trees rendering fixes
[snf-cloudcms] / cloudcms / templates / cms / footer.html
index 3d87acf..e9613ee 100644 (file)
@@ -1,24 +1,27 @@
+{% load feincms_tags mptt_tags feincms_page_tags %}
 {% if APP.footer_top %}
 <p>
     {{ APP.footer_top|safe }}
 </p>
 {% endif %}
 <div class="clearfix">
-       {% load feincms_tags feincms_page_tags %}
-       {% feincms_navigation of feincms_page as sublevel level=2,depth=1 %}
-       {% for p in sublevel %}
-       <ul class="col">
-               <li>
-                       <a href="{{ p.get_absolute_url }}">{{ p.title }}</a>
-               </li>
-       {% feincms_navigation of p as innerlinks level=3,depth=2 %}
-       {% for innerp in innerlinks %}
-               <li>
-                       <a href="{{ innerp.get_absolute_url }}">{{ innerp.title }}</a>
-               </li>
-       {% endfor %}
-       </ul>
-       {% endfor %}
+    {% feincms_nav feincms_page level=2 depth=1 as sublevel %}
+    {% recursetree sublevel %}
+    {% with node as p %}
+    <ul class="col">
+        <li>
+            <a href="{{ p.get_absolute_url }}">{{ p.title }}</a>
+            </li>
+            {% if not p.is_leaf_node %} 
+    {% for innerp in children %}
+        <li>
+            <a href="{{ innerp.get_absolute_url }}">{{ innerp.title }}</a>
+        </li>
+        {% endfor %}
+        {% endif %}
+    </ul>
+    {% endwith %}
+    {% endrecursetree %}
 </div>
 
 {% if APP.footer_bottom %}