--- ECHO_content/ECHO_collection.py 2004/05/06 11:06:12 1.53 +++ ECHO_content/ECHO_collection.py 2004/05/07 14:34:07 1.63 @@ -354,7 +354,7 @@ class ECHO_resource(Folder): coordsnew=[] setECHO_collectionInformation(self,title,label,description,contentType,responsible,credits,weight,coordsnew) - + self.viewClassification=viewClassification self.coords=coordsnew[0:] self.link=link self.metalink=metalink @@ -577,6 +577,8 @@ class ECHO_collection(Folder, Persistent security=ClassSecurityInfo() meta_type='ECHO_collection' + displayTypes=displayTypes + def getTitle(self): """title""" return self.title.encode('utf-8') @@ -642,14 +644,14 @@ class ECHO_collection(Folder, Persistent element=getattr(object,entry) try: if element.meta_type in ["ECHO_collection","ECHO_group"]: - collections+="" + collections+="" collections+=getCollection(element,depth)+"\n" except: """nothing""" return collections - - return ""+getCollection(self)+"" + ret="""""" + return ret+""+getCollection(self)+"" def createJavaScript(self): """CreateJava""" @@ -856,8 +858,10 @@ class ECHO_collection(Folder, Persistent return self.showOverview() elif hasattr(self,'collection_index_template'): return self.collection_index_template() + elif hasattr(self,'main_index_template'): + return self.main_index_template() - pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_collection_index_standard.zpt').__of__(self) + pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_main_index_template_standard.zpt').__of__(self) pt.content_type="text/html" return pt() @@ -938,20 +942,22 @@ class ECHO_group(ECHO_collection): def index_html(self): """standard page""" displayedObjects=self.ZopeFind(self,obj_metatypes=displayTypes) - if len(displayedObjects)==1: # nur ein Object dann redirect auf dieses Object - return self.REQUEST.RESPONSE.redirect(displayedObjects[0][1].absolute_url()) + #if (len(displayedObjects)==1) and (displayedObjects[0][1].meta_type=="ECHO_collection"): # nur ein Object dann redirect auf dieses Object + # return self.REQUEST.RESPONSE.redirect(displayedObjects[0][1].absolute_url()) if 'index.html' in self.__dict__.keys(): return getattr(self,'index.html')() - + elif 'overview' in self.__dict__.keys(): - return self.showOverview() + return self.showOverview() elif hasattr(self,'group_index_template'): - return self.group_index_template() + return self.group_index_template() elif hasattr(self,'collection_index_template'): - return self.collection_index_template() + return self.collection_index_template() + elif hasattr(self,'main_index_template'): + return self.main_index_template() - pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_group_index_standard.zpt').__of__(self) + pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_main_index_template_standard.zpt').__of__(self) pt.content_type="text/html" return pt() @@ -1050,14 +1056,22 @@ class ECHO_root(Folder,Persistent,Implic else: retStr="