version 1.1.2.8, 2009/04/16 15:55:19
|
version 1.1.2.9, 2009/11/06 15:37:42
|
Line 130 def getBreadcrumbs(self):
|
Line 130 def getBreadcrumbs(self):
|
return crumbs |
return crumbs |
|
|
|
|
def getSection(self): |
def getSection(self, crumbs=None): |
"""returns the current section name""" |
"""returns the current section name""" |
|
# use breadcrumbs if available |
|
if crumbs is not None and len(crumbs) > 0: |
|
return crumbs[0][2].getId() |
|
|
p = self |
p = self |
sec = None |
sec = None |
# descend parents to the root (and remember the last id) |
# descend parents to the root (and remember the last id) |
Line 141 def getSection(self):
|
Line 145 def getSection(self):
|
|
|
return sec |
return sec |
|
|
def getSubSection(self): |
def getSubSection(self, crumbs=None): |
"""returns the current subsection name""" |
"""returns the current subsection name""" |
|
# use breadcrumbs if available |
|
if crumbs is not None and len(crumbs) > 1: |
|
return crumbs[1][2].getId() |
|
|
p = self |
p = self |
sec = None |
sec = None |
subsec = None |
subsec = None |