--- ECHO_content/VLPExtension.py 2004/06/08 17:17:07 1.8 +++ ECHO_content/VLPExtension.py 2004/06/25 11:02:16 1.10 @@ -1,4 +1,4 @@ -from ECHO_collection import * +from Products.ECHO_content.ECHO_collection import * from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplate import PageTemplate from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate @@ -22,6 +22,21 @@ class VLP_essay(Folder): {'label':'Main Config','action':'ConfigVLP_essayForm'}, ) + def content_html(self,type='collection'): + """template fuer content""" + #templates = self.ZopeFind(self.aq_parent,obj_ids=[type+"_template"]) + # + #if templates: + # return templates[0][1]() + + if hasattr(self,type+"_template"): + obj=getattr(self,type+"_template") + return obj() + else: + pt=PageTemplateFile('Products/ECHO_content/zpt/ECHO_%s_template_standard.zpt'%type).__of__(self) + pt.content_type="text/html" + return pt() + def ConfigVLP_essayForm(self): """Form for adding""" pt=PageTemplateFile('Products/ECHO_content/vlp/ChangeVLP_essay.zpt').__of__(self)