[Zope-CMF] How to count the number of replies?

Tres Seaver tseaver@palladion.com
Wed, 18 Jul 2001 17:49:57 -0400 (EDT)


On Wed, 18 Jul 2001, Ausum wrote:

> Is there a default method to count the number of replies to a
> discussion-enabled content object?
> How could it be done, in the case there isn't one?

If you care only about the "top-level" replies to an object, you
can compute the length of the set returned by
'obj.talkback.getReplies()'.  If you want all replies "below" an
object, then use the new 'replyCount' method of DiscussionContainer
class (added to CVS after CMF 1.1).

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org