[Zope] "Document" assembly with Zope

Max Møller Rasmussen maxm@normik.dk
Mon, 25 Jun 2001 16:13:04 +0200


> From: complaw@hal-pc.org [mailto:complaw@hal-pc.org]

> Has anyone seen something like that for Zope or know where to begin?

The easiest would probably be to write a recursive Python Method something
like this.

Absolutely untested !

    def collect(result=''):
        # get all text from this level
        for dtml_method in contex.objectValues('Dtml method'):
            result = result + dtml_method()
        # get all text from sublevels
        for folder in contex.objectValues('Folder'):
            result = folder.collect(result)
        return result

then you just chose a folder and add 'collect' to the url and you should see
a compund document::

    http://localhost:8080/docRoot/collect

Regards Max M