--- ECHO_content/ECHO_collection.py 2005/07/20 11:49:05 1.229 +++ ECHO_content/ECHO_collection.py 2005/07/29 11:17:08 1.231 @@ -1,3 +1,5 @@ + + """New version of the product started February, 8th. Without scientific classification, use content-type for further classification.""" """Echo collection provides the classes for the ECHO content web-site. @@ -1514,13 +1516,16 @@ class ECHO_collection(Folder, Persistent for content in contents: if content[1].meta_type=='ECHO_link': find=content[1].ZopeFind(content[1],obj_metatypes=('ECHO_mapText')) - root=find[0][1] + if find: + root=find[0][1] - locale=find[0][1].ZopeFind(find[0][1],obj_ids=('locale_en')) + locale=find[0][1].ZopeFind(find[0][1],obj_ids=('locale_en')) + else: + root=None else: root=content[1] locale=content[1].ZopeFind(content[1],obj_ids=('locale_en')) - if not locale: + if root and not locale: root.manage_addECHO_locale("en",'','') pt=zptFile(self, 'zpt/localizeObjects.zpt') @@ -2086,7 +2091,7 @@ class ECHO_collection(Folder, Persistent security.declarePublic('changeECHO_collection') - def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour="",location=None,isAlwaysClickable=None): + def changeECHO_collection(self,title,label,description,contentType,responsible,weight,secondaryLink,secondaryLinkTitle,credits=None,sortfield="weight",coords=None,RESPONSE=None,imageTag="",bgcolour="",location=None,isAlwaysClickable=None,prefix="",suffix=""): """Aenderung der Properties""" self.secondaryLink=secondaryLink @@ -2095,7 +2100,9 @@ class ECHO_collection(Folder, Persistent self.bgcolour=bgcolour self.location=location self.isAlwaysClickable=isAlwaysClickable - + self.prefix=prefix[0:] + self.suffix=suffix[0:] + setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight) self.sortfield=sortfield