--- ECHO_content/ECHO_Nav.py 2004/05/11 14:57:35 1.27 +++ ECHO_content/ECHO_Nav.py 2004/05/28 09:55:24 1.30 @@ -284,6 +284,10 @@ class ECHO_navigation(Folder): displayedMetaTypes=displayTypes + def getR(self): + """re""" + return self.REQUEST + def __init__(self,id,title,pathToHierarchy): """init""" self.id=id @@ -361,7 +365,7 @@ class ECHO_navigation(Folder): tempObj=self.pathToHierarchy[0:] tempObj=re.sub("/",".",tempObj) tempObj="self.aq_parent"+tempObj - + #print tempObj objtemp=eval(tempObj) obj=objtemp @@ -516,6 +520,16 @@ class ECHO_navigation(Folder): return len(self.barFromHash(self.createNavHash(0))) + def startOfHierarchy(self,list): + splitted=self.pathToHierarchy.split("/") + last=splitted[len(splitted)-1] + #print last,list + try: + nr=list.index(last) + except: + nr=0 + return nr+1 + def secondNavElements(self): """Zweite Ordnung""" @@ -527,8 +541,12 @@ class ECHO_navigation(Folder): splitted=ult_temp.split("/") - - start=[splitted[2]] + #print "AU",self.absolute_url(),splitted + #start=[splitted[2]] #orig + startNr= self.startOfHierarchy(splitted) + + start=[splitted[startNr]] + #print start keys=self.barFromHash(hash,start=start) @@ -553,7 +571,10 @@ class ECHO_navigation(Folder): ## else: ## start=[splitted[len(splitted)-1]] - start=splitted[2:order+1] + #start=splitted[2:order+1] #orig + startNr= self.startOfHierarchy(splitted) + #print startNr + start=splitted[startNr:order+startNr-1] #print start keys=self.barFromHash(hash,start=start) @@ -611,6 +632,7 @@ def createPath(url1,url2): if temp2[0]==test: del temp2[0] + #print "CP:"+url1+"::"+url2+"::"+url1+"/"+string.join(temp2,"/") return url1+"/"+string.join(temp2,"/") def sortWeight(x,y):