--- ECHO_content/ECHO_Nav.py 2004/05/06 13:35:25 1.22 +++ ECHO_content/ECHO_Nav.py 2004/05/28 06:28:22 1.28 @@ -13,6 +13,7 @@ import os.path from Globals import package_home import urllib from ECHO_helpers import displayTypes,checkOnlyOneInGroup +from ECHO_collection import content_html class ECHO_contentType(Image): """ContentType Object""" @@ -181,6 +182,10 @@ class ECHO_pageTemplate(ZopePageTemplate {'label':'Weight and Type','action':'changeECHO_pageTemplateWeightForm'}, ) + def content_html(self): + """content_html""" + return content_html(self,'pageTemplate') + def changeECHO_pageTemplateWeightForm(self): """change""" pt=PageTemplateFile('Products/ECHO_content/zpt/ChangeECHO_pageTemplateWeight.zpt').__of__(self) @@ -279,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 @@ -356,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 @@ -386,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') @@ -430,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 @@ -522,9 +531,11 @@ 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) @@ -548,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) @@ -606,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):