--- ECHO_content/ECHO_collection.py 2007/04/30 16:30:09 1.288 +++ ECHO_content/ECHO_collection.py 2007/07/19 14:13:13 1.290 @@ -200,6 +200,8 @@ class ECHO_locale(ZopePageTemplate): self.title=title self.label=label if text: + if content_type is None: + content_type = self.content_type self.pt_edit(text, content_type) self.id=id @@ -218,6 +220,8 @@ class ECHO_locale(ZopePageTemplate): self.title=title self.label=label if not text is None: + if content_type is None: + content_type = self.content_type self.pt_edit(text, content_type) if RESPONSE is not None: @@ -307,6 +311,8 @@ class ECHO_layoutTemplate(ZopePageTempla if text is None: self._default_content_fn = os.path.join(package_home(globals()),'zpt','ECHO_%s_template_standard.zpt'%EchoType) text = open(self._default_content_fn).read() + if content_type is None: + content_type = self.content_type self.pt_edit(text, content_type) @@ -1999,7 +2005,7 @@ class ECHO_link(ECHO_externalLink): params['backLink']=self.aq_parent.absolute_url() params['startLink']=splitted[0]+"?"+urllib.urlencode(params) - + return self.REQUEST.RESPONSE.redirect(splitted[0]+"?"+urllib.urlencode(params)) else: return "" @@ -2164,16 +2170,16 @@ class ECHO_collection(CatalogAware, Fold if obj.meta_type=="ECHO_mapText": if splitted[1]=="en": - obj.locale_en.pt_edit(REQUEST.form[key],None) + obj.locale_en.pt_edit(REQUEST.form[key],obj.locale_en.content_type) else: - obj.pt_edit(REQUEST.form[key],None) + obj.pt_edit(REQUEST.form[key],obj.content_type) else: text=obj.ZopeFind(obj,obj_metatypes=['ECHO_mapText']) if splitted[1]=="en": - text[0][1].locale_en.pt_edit(REQUEST.form[key],None) + text[0][1].locale_en.pt_edit(REQUEST.form[key],text[0][1].locale_en.content_type) else: - text[0][1].pt_edit(REQUEST.form[key],None) + text[0][1].pt_edit(REQUEST.form[key],text[0][1].content_type) if RESPONSE is not None: RESPONSE.redirect('manage_main') @@ -4134,6 +4140,8 @@ class ECHO_linkList(ZopePageTemplate,ECH self.ZBindings_edit(self._default_bindings) if text is None: text = '' + if content_type is None: + content_type = self.content_type self.pt_edit(text, contentType)