Re: Modifizieren eines ATDocuments vor dem Rendern

Robert Barsch <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hallo,

hmm mit ATDocument.CookedBody kann ich in Plone 3 wohl nicht mehr dafür
nutzen - welche Methode ich den dann "gefahrlos" patchen?

Danke,
Robert

>> 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


- --

Dipl.-Geophys. Robert Barsch
Department für Geo- und Umweltwissenschaften
Geophysik
Ludwig-Maximilians-Universität
Theresienstrasse 41
80333 München
Deutschland

Tel: +49 (0) 89 2180 4201
Fax: +49 (0) 89 2180 4205
Mail: [email protected]


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKGTBSIVowwEY4LjQRAhfbAKDiPq3CidpB7WF8Q9eXQydIelzsOQCeIsRE
LEwETOrAQgybgbMkKfWtpf4=
=1+OX
-----END PGP SIGNATURE-----


_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.