At 2000-08-20 23:06 -0700, [EMAIL PROTECTED] wrote:

>I would like to loop through the contents of a folder, and the
>contents of the subfolders of that folder.  I know I can do this to a
>singular level by doing something like:
>
><dtml-in "subfolder.objectValues('Folder')">
><dtml-var title>
></dtml-in>
>
>Should give me a list of the titles of all the subfolders of the
>folder called "subfolder".  So, once I get there, how do I loop
>through the subobjects of each of those folders?
>
>In other words, I have a subfolder inside of the folder called
>"subfolder" and I want to see the contents of that folder.  How do I
>do it?
>--

I've used code similar to the following in an external method before:

thisitem = self.getFirstChild()
while thisitem is not None:
     if thisitem.meta_type == 'DTML Document':
         ...
     thisitem = thisitem.getNextSibling()


I haven't tried to do it in DTML.

David Trudgett




_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to