--- ECHO_content/VLPExtension.py 2008/10/08 10:51:53 1.80 +++ ECHO_content/VLPExtension.py 2008/11/16 12:15:42 1.83 @@ -524,7 +524,7 @@ class VLP_collection(ECHO_collection,Acq if name.startswith("lit"): #umleitung wenn lit aufgerufen wirk # umleitung auf den eigentlichen folder nur wenn direkt der Folder litXXX oder dessen index_html methode aufgerufen wird - if lastActual.startswith("lit") or (lastActual=="index_html"): + if lastActual.startswith("lit") or (lastActual=="index_html") or (lastActual=="index_meta"): #obj=self. ZopeFind(self,obj_ids=[name],search_sub=1) ob=self.findObjFromLitName(name) if not ob: @@ -533,7 +533,11 @@ class VLP_collection(ECHO_collection,Acq logging.error("request:"+repr(ob)) request.response.setStatus(200) + #if (lastActual=="index_meta"): + # logging.debug("index_meta requested") + # return ob.index_meta return ob + else: ## andern falls transversiere zum parent. obj = self.aq_parent return obj @@ -553,7 +557,15 @@ class VLP_collection(ECHO_collection,Acq {'label':'Update Library','action':'updateCollection'}, {'label':'Update Metadata','action':'updateCollectionMD'}, ) - + def getAllRessources(self): + """getallressources""" + res=self.ZopeFind(self,obj_metatypes=['VLP_resource'],search_sub=1) + ret=[] + for r in res: + ret.append([r[0],r[1].absolute_url()]) + + return ret + def generateSubCollections(self,errorsTXT="",forceUpdate=False,RESPONSE=None): """erzeuge subcollectionen""" logging.debug("generateSubCollections") @@ -955,13 +967,16 @@ class VLP_resource(ECHO_resource,Cacheab RESPONSE.redirect('manage_main') - def index_meta(self): + def index_meta(self,RESPONSE=None): """index_meta""" - + pt=PageTemplateFile(os.path.join(package_home(globals()),'vlp','index_meta.zpt')).__of__(self) - pt.content_type="text/html" - return pt() - + pt.content_type="text/xml" + x= pt.pt_render() + #logging.debug("index_meta 4:"+x) + if RESPONSE: + RESPONSE.setHeader("Content-Type","text/xml") + return x def file2page(self,p): """converts filename to pagenumber"""