diff MPIWGRoot.py @ 10:c711fe75d0ac

order by weight form for MPIWGFolder. more cleanup.
author casties
date Tue, 26 Feb 2013 20:39:34 +0100
parents 5db416602e85
children 325e7c338815
line wrap: on
line diff
--- a/MPIWGRoot.py	Fri Feb 15 20:51:34 2013 +0100
+++ b/MPIWGRoot.py	Tue Feb 26 20:39:34 2013 +0100
@@ -225,10 +225,11 @@
         subret.sort(sortWeight)
         return subret
     
-    def subNav(self,obj):
-        """return sub-navigation elements i.e. below sections"""
-        # get section -> parent should be MPIWGRoot
-        p = obj
+    def getSubsections(self, here=None):
+        """return sub-navigation elements i.e. elements below sections"""
+        p = here
+        if p is None:
+            p = self
         sec = None
         # descend parents to the root (and remember the last id)
         while p is not None and p.meta_type != 'MPIWGRoot':
@@ -239,6 +240,9 @@
         subsecs = [s for s in subsecs if s[1].title != ""]
         subsecs.sort(sortWeight)
         return subsecs
+
+    # compatibility
+    subNav = getSubsections
                 
     def isType(self,object,meta_type):
         """teste ob ein object vom meta_type ist."""