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! James W. Howe mailto:jwh@allencreek.com Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103
Hi James, You can try: <dtml-in "folderA.objectValues['Folder']"> <dtml-var title> </dtml-in> This will give to you a list of subfolders from Folder A. This resolve your problem ? Best Regards, -- Ze Octavio -- Hiperlógica <http://hiper.com.br> Automação de web-sites | Web-site automation São Paulo | Brasil | Fone: +55-11-8168067 "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!
James W. Howe mailto:jwh@allencreek.com Allen Creek Software, Inc. pgpkey: http://ic.net/~jwh/pgpkey.html Ann Arbor, MI 48103
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
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 ******************************************************
participants (3)
-
James W. Howe -
Oscar Picasso -
Ze Octavio