manage_edit for Page Templates
hi. there is a manage_edit() to modify the contents of a DTML document. is there anything similar for page templates? i tried manage_edit() on a page template and i get an attribute error for manage_edit... the document_src() method works though.... thanks rushabh
--On Montag, 25. April 2005 16:23 Uhr +0530 Rushabh Mehta <rmehta@gmail.com> wrote:
hi. there is a manage_edit() to modify the contents of a DTML document. is there anything similar for page templates? i tried manage_edit() on a page template and i get an attribute error for manage_edit... the document_src() method works though....
Sometimes it helps when you look at the sources -> pt_edit() :-) -aj
On 25/04/05, Rushabh Mehta <rmehta@gmail.com> wrote:
hi. there is a manage_edit() to modify the contents of a DTML document. is there anything similar for page templates? i tried manage_edit() on a page template and i get an attribute error for manage_edit... the document_src() method works though.... thanks rushabh
A quick look at zope-2.7.4/lib/python/Products/PageTemplates/PageTemplate.py gives me this: def pt_edit(self, text, content_type): Where text is the new content, and content_type is self explanatory. -- Phillip Hutchings http://www.sitharus.com/ sitharus@gmail.com / sitharus@sitharus.com
thanks a lot, that works well... ill make it a point to hunt the sources, now that i know where to look :-) On 4/25/05, Phillip Hutchings <sitharus@gmail.com> wrote:
On 25/04/05, Rushabh Mehta <rmehta@gmail.com> wrote:
hi. there is a manage_edit() to modify the contents of a DTML document. is there anything similar for page templates? i tried manage_edit() on a page template and i get an attribute error for manage_edit... the document_src() method works though.... thanks rushabh
A quick look at zope-2.7.4/lib/python/Products/PageTemplates/PageTemplate.py gives me this: def pt_edit(self, text, content_type):
Where text is the new content, and content_type is self explanatory.
-- Phillip Hutchings http://www.sitharus.com/ sitharus@gmail.com / sitharus@sitharus.com
participants (3)
-
Andreas Jung -
Phillip Hutchings -
Rushabh Mehta