[python && zope]folder listings
Hi, I'm not sure what I'm doing wrong, but what I want is a folder listing, including subfolders. I have the following python script called 'dtmllist': list=[] for i in context.objectValues(): if i.meta_type == 'Folder': list.append(i) list.append(i.dtmllist()) elif i.meta_type == 'DTML Document': list.append(i) return list When I test this script I get all the instances of objects like "<Folder instance at 8b5b670>, [<DTMLDocument instance at 8d79290>, .]". So it does see contents of the subdirectories. But. When I create a dtml document and fill it with this code: <dtml-in "dtmllist()"> <dtml-var id> -- <dtml-var title> -- <dtml-var meta_type> </dtml-in> .it shows this only the current folder of the dtml document. No subdirectories. Does anybody know why? Thanks.
On Fri, Sep 13, 2002 at 11:32:13AM +0200, Bas van Ombergen wrote:
.it shows this only the current folder of the dtml document. No subdirectories. Does anybody know why?
Have you tried putting that code into a DTML method instead of a document? The document's own namespace causes several problems, and this might be one of them. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
participants (2)
-
Bas van Ombergen -
Mike Renfro