--- ECHO_content/ECHO_Nav.py 2004/05/10 13:51:03 1.24 +++ ECHO_content/ECHO_Nav.py 2004/05/28 06:28:22 1.28 @@ -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 @@ -391,7 +395,7 @@ class ECHO_navigation(Folder): for z in temp[x][1].getNavList(): listNav.append((z[0],z[1],None)) else: - # add label fals existiert und nicht leer + # add label falls existiert und nicht leer if hasattr(temp[x][1],'label'): if not temp[x][1].label=='': label=temp[x][1].label.encode('utf-8') @@ -435,14 +439,14 @@ class ECHO_navigation(Folder): def isSelectedPath(self,item): """test is path is already selected""" - found=re.search("\?(.*)",item[1]) + found=re.search("\?(.*)/",item[1]) if found: temp=re.sub(" ","%20",found.group(0)) #print temp+"::"+self.REQUEST['QUERY_STRING'] if ("?"+self.REQUEST['QUERY_STRING'])==temp: return 1 - if re.search(item[1],self.REQUEST['URL']): + if re.search(item[1]+"/",self.REQUEST['URL']): return 1 else: return 0 @@ -527,11 +531,13 @@ class ECHO_navigation(Folder): splitted=ult_temp.split("/") - - start=[splitted[2]] - #print start + print "AU",self.absolute_url(),splitted + #start=[splitted[2]] #orig + start=[splitted[1]] + + print start - keys=self.barFromHash(hash,start=start,showElements) + keys=self.barFromHash(hash,start=start) return keys @@ -553,7 +559,8 @@ class ECHO_navigation(Folder): ## else: ## start=[splitted[len(splitted)-1]] - start=splitted[2:order+1] + #start=splitted[2:order+1] #orig + start=splitted[1:order] #print start keys=self.barFromHash(hash,start=start) @@ -611,6 +618,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):