[Zope-CMF] Delete replies?
Tres Seaver
tseaver@palladion.com
Sat, 02 Jun 2001 14:15:06 -0400
Chris Withers wrote:
> I think I'm being dumb :-S
>
> How do I delete replies to portal content?
First you write an ExternalMethod to do it for you (the current
implementation has no direct knobs to do it, as it wasn't a
requirement for PTK/CMF).
Something like:
def deleteReply( self, reply_path ):
"""
Delete the reply pointed to by 'reply_path' from our talkback.
"""
if type( reply_path ) == type( '' ):
reply_path = string.split( reply_path, '/' )
reply_id = reply_path[ -1 ]
del self.talkback._container[ reply_id ]
Then you contribute it back as a patch to CMFDefault.DiscussionItem.py :)
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org