Re: Modifizieren eines ATDocuments vor dem Rendern
Andreas Jung <[email protected]>
| Newsgroups | gmane.comp.web.zope.german |
|---|---|
| Organization | ZOPYX Ltd & Co. KG |
| Message-ID | <[email protected]> |
On 16.05.09 13:54, Robert Barsch wrote: > Hallo Liste, > > ich möchte gerne in Plone 3 vor dem Rendern einer Page (ATDocument) den > von Plone generierten HTML Output des Body Textes modifizieren können. > > > In Plone 2.1 geht sowas via Monkey Patch: > > >> from Products.ATContentTypes.types.ATDocument import ATDocument >> >> def CookedBody(self, stx_level=None, setlevel=0): >> text = self.getText() >> # do someting with the text >> text = text.upper() >> return text >> >> ATDocument.CookedBody = CookedBody >> > > Wie würde ich sowas machen ohne Einführung eines neuen ContentTypes und > auf möglichst eleganter Art & Weise mit Zope 3 Techniken? Monkeypatching ist "good enough". Zope 3 Techniken helfen Dir hier auch nicht viel weiter. Andreas _______________________________________________ zope mailing list [email protected] https://mail.dzug.org/mailman/listinfo/zope
lists.vcf
(text/x-vcard, 316 B)
begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. & Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:[email protected] title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard