--- MPIWGWeb/MPIWGProjects.py 2006/10/19 07:32:51 1.47.2.61 +++ MPIWGWeb/MPIWGProjects.py 2006/10/27 18:37:20 1.47.2.62 @@ -453,6 +453,26 @@ class MPIWGRoot(ZSQLExtendFolder): return True return False + def getSection(self): + """returns the current section name""" + root = self.absolute_url() + url = self.REQUEST['URL'] + path = string.replace(url, root, '') + paths = path.split('/') + if len(paths) > 0: + return paths[1] + return None + + def getSectionStyle(self, name, style=""): + """returns a string with the given style + '-sel' if the current section == name""" + if self.getSection() == name: + return style + '-sel' + else: + return style + + def MPIWGrootURL(self): + """returns the URL to the root""" + return self.absolute_url() def upDateSQL(self,fileName): """updates SQL databases using fm.jar"""