![]() |
|
|
+ Search |
![]()
|
Aug 9th, 2000 06:15
unknown unknown, Kapil Thangavelu
if children aren't nested
<dtml-let x="objectIds(['childrenClass'])">
<dtml-var "_.len(x)">
</dtml-let>
if children are nested you probably need a recursive dtml/python method.
in python
def count_children(o):
x = o.objectItems(['childClass'])
sum = len(x)
for child, child_name in x:
sum = sum + count_children(child)
return sum