"J. Atwood" wrote:
> So In ZUBB (my discussion product) I want to be able to show how many
> replies there have been to any one main topic. All replies are 'children' of
> the main post and when I state it with
> <dtml-tree branches=children>
> It works and knows that each message is a child of the message.
> When in go through a searchResult to list the message I want to show many
> replies there are to that message.
> Q: How do I count the 'children' of any one onject?
if children aren't nested
if children are nested you probably need a recursive dtml/python method.
x = o.objectItems(['childClass'])
sum = len(x)
for child, child_name in x:
sum = sum + count_children(child)
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -