Configurable Batch Size for Ploneboard while viewing conversations

2 messages Options
Embed this post
Permalink
Suresh V. () Configurable Batch Size for Ploneboard while viewing conversations
Reply Threaded More More options
Print post
Permalink
Has anyone implemented this?

Suresh


_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers
simahawk () Re: Configurable Batch Size for Ploneboard while viewing conversations
Reply Threaded More More options
Print post
Permalink
Hi,

On Sat, 2009-09-05 at 14:07 +0530, Suresh V. wrote:
> Has anyone implemented this?

you can override the class of ConversationView.

See Product.Ploneboard.browser.comment.py:

class ConversationView(CommentView):
    """A view component for querying conversations.
    """

[...]
    def comments(self):
        batchSize = 30
        batchStart = int(self.request.get('b_start', 0))
        numComments = self.context.getNumberOfComments()
        return Batch(self._getComments, numComments, batchSize,
batchStart, orphan=1)
[...]

Hope this helps.


_______________________________________________
Product-Developers mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/product-developers