[Zope-CMF] How to count the number of replies?
Ausum
augusto@artlover.com
Wed, 18 Jul 2001 17:53:07 -0500
Thank you very much, Tres. I've downloaded CMF from CVS not more than
three days ago, and the methods are in the DiscussionItem.py module, but
I can't get it to work, no matter what combination of code I've tried,
feeling my way all the time.
Would you please post the code, in you don't mind, the same as you did
with 'obj.talkback.getReplies()' ?
Thanks in advance
Ausum
Tres Seaver wrote:
>
> 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
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests