--- ECHO_content/ECHO_collection.py 2005/01/31 11:15:50 1.207 +++ ECHO_content/ECHO_collection.py 2005/02/07 18:29:07 1.209 @@ -968,7 +968,7 @@ class ECHO_resource(Folder,Persistent,EC def getMDValue(self,fieldName,empty=None): - if empty: + if not empty: return self.metaDataHash.get(fieldName,'!!NOT USED HERE in Type: %s'%self.contentType) else: @@ -1065,7 +1065,8 @@ class ECHO_resource(Folder,Persistent,EC if ret == "": return None else: - return ret + + return ret except: return None @@ -1979,7 +1980,8 @@ class ECHO_collection(Folder, Persistent elif hasattr(self,'collection_index_template'): ret=self.collection_index_template() elif hasattr(self,'main_index_template'): - ret=self.main_index_template() + + ret=self.main_index_template.__of__(self)(self.main_template) else: pt=zptFile(self, 'zpt/ECHO_main_index_template_standard.zpt') pt.content_type="text/html" @@ -2373,6 +2375,8 @@ class ECHO_root(Folder,Persistent,Implic def checkResource(self,id): """checks if a resource is in the tree, gives back none or list of resources""" + if not id: + id="" splitted=id.split("/") id=splitted[len(splitted)-1] if hasattr(self,"_v_checkResource") and self._v_checkResource.has_key(id): #existiert ein cache und id ist bereits drin?