[Zope] Data aggregation within a tree
Dieter Maurer
dieter@handshake.de
Tue, 16 Jul 2002 21:44:40 +0200
Brad Knotwell writes:
> My application has two custom objects types (one of them is
> folderish). I'm trying to add a view to the folderish object that'll
> aggregate statistics information on the lower-levels of the tree.
>
> Specifically, I'd like a flavor for how to do the following:
>
> traverse a tree w/o rendering it
> test an object's type
> if an object is a specific type:
> update counters appropriately based on the internal state of
> the object
>
> render the results
>
> Since I only want to traverse the tree (not render it), am I correct
> in presuming dtml-tree isn't my friend in this case and I'll need to
> work in straight Python instead?
You are correct.
Look at the code of "OFS.FindSupport.ZopeFind" and see how it implements
traversal.
Do the same in either an External Method or a Python Script (here
several access restrictions will apply).
Dieter