[Zope] Dynamically Accessing Subfolders

Oscar Picasso picasso@videotron.ca
Tue, 19 Oct 1999 21:51:31 -0400


If my_method is the name of the method you put in each subfolder, try:
Method in Folder A:

<dtml-in "objectValues('Folder')">
  <dtml-var my_method>
</dtml-in>

I'm still consider myself as a newbie but I think it should work.

At 17:36 99-10-19 -0400, James W. Howe wrote:
>I want to write a DTML method which iterates over all subfolders contained 
>in a specific folder and execute a DTML method from each of the subfolders 
>that were found.  For example, suppose that I had the following folder 
>structure:
>
>Folder A
>	Folder B
>	Folder C
>	Folder D
>
>In each of the subfolders there is a DTML method called "myName" which 
>answers some string value.  For example, myName as defined in Folder B 
>might be "I'm B".  When I execute the method from anywhere in the folder 
>hierarchy I want to get an answer similar to:
>
>I'm B
>I'm C
>I'm D
>
>Is there a method that I can call for a folder which will give me it's 
>subfolder names?  I'm assuming that if there was such a method, I could use 
>a dtml-in tag to iterate over the results.  If there is such a method, what 
>does it return and how could I use that information to send a message to 
>each subfolder in turn?
>
>Thanks!


******************************************************
Oscar Picasso
picasso@videotron.ca
******************************************************