changeset 1893:7f04d451cd7b

fix for 231 foobar theme has empty box below meta values
author Roger Haase <crosseyedpenguin@yahoo.com>
date Fri, 21 Dec 2012 13:43:44 -0700
parents cbaa6b764de5
children 38454bb987f8
files MoinMoin/templates/utils.html MoinMoin/themes/foobar/templates/show.html
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/utils.html	Mon Dec 17 08:59:53 2012 -0700
+++ b/MoinMoin/templates/utils.html	Fri Dec 21 13:43:44 2012 -0700
@@ -78,8 +78,10 @@
     </ul>
 {% endmacro %}
 
-{% macro render_subitem_navigation(itemname, newtab) %}
-    {% set subitems = theme_supp.subitem_index(itemname) %}
+{% macro render_subitem_navigation(itemname, newtab, subitems=None) %}
+    {% if not subitems %}
+        {% set subitems = theme_supp.subitem_index(itemname) %}
+    {% endif %}
     {% if caller %}
         {% set mycaller = caller %}
     {% endif %}
--- a/MoinMoin/themes/foobar/templates/show.html	Mon Dec 17 08:59:53 2012 -0700
+++ b/MoinMoin/themes/foobar/templates/show.html	Fri Dec 21 13:43:44 2012 -0700
@@ -43,11 +43,14 @@
             </ul>
         </li>
         {% endif %}
+        {% set subitems = theme_supp.subitem_index(item_name) %}
+        {% if subitems %}
         <li>
             {% block subitem_navigation %}
-            {{ utils.render_subitem_navigation(item_name, False) }}
+            {{ utils.render_subitem_navigation(item_name, False, subitems=subitems) }}
             {% endblock %}
         </li>
+        {% endif %}
     </ul>
 {% endblock %}