--- ECHO_content/ECHO_collection.py 2004/08/31 17:20:31 1.167 +++ ECHO_content/ECHO_collection.py 2004/09/01 14:32:32 1.168 @@ -2542,7 +2542,7 @@ class ECHO_collection(Folder, Persistent else: return "#dddddd" - def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour="",viewClassification=None,location=None): + def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour="",viewClassification=None,location=None,isAlwaysClickable=None): """Aenderung der Properties""" self.secondaryLink=secondaryLink @@ -2551,6 +2551,7 @@ class ECHO_collection(Folder, Persistent self.bgcolour=bgcolour self.viewClassification=viewClassification self.location=location + self.isAlwaysClickable=isAlwaysClickable if coords: coordsnew=[ string.split(x,",") for x in coords] @@ -3477,9 +3478,15 @@ class ECHO_root(Folder,Persistent,Implic for link in links: link.tagName="a" - ref=link.getAttribute("ref") + ref=link.getAttribute("ref") + pn=link.getAttribute("page") + if self.checkRef(ref): - link.setAttribute("href",self.aq_parent.absolute_url()+"/vlp_coll?id="+ref) + if pn: + link.setAttribute("href",self.aq_parent.absolute_url()+"/vlp_coll?id="+ref+"&p="+pn) + else: + link.setAttribute("href",self.aq_parent.absolute_url()+"/vlp_coll?id="+ref) + newxml=dom.toxml('utf-8') @@ -3493,18 +3500,23 @@ class ECHO_root(Folder,Persistent,Implic def xml2html(self,str,quote="yes"): """link2html fuer VLP muss hier noch raus""" #print str + if str: if quote=="yes2": str=re.sub("\&","&",str) dom=xml.dom.minidom.parseString(str) links=dom.getElementsByTagName("link") - for link in links: link.tagName="a" ref=link.getAttribute("ref") + pn=link.getAttribute("page") + if self.checkRef(ref): - link.setAttribute("href",self.aq_parent.absolute_url()+"/vlp_coll?id="+ref) + if pn: + link.setAttribute("href",self.aq_parent.absolute_url()+"/vlp_coll?id="+ref+"&p="+pn) + else: + link.setAttribute("href",self.aq_parent.absolute_url()+"/vlp_coll?id="+ref) str= dom.toxml() @@ -3515,7 +3527,7 @@ class ECHO_root(Folder,Persistent,Implic return "" def checkRef(self,ref): - dbs={'vl_literature':'AND CD LIKE \'%lise%\'','vl_technology':'','vl_people':''} + dbs={'vl_literature':'AND CD LIKE \'%lise%\'','vl_technology':'','vl_people':'','vl_sites':''} res=None for db in dbs.keys():