[Zope] Dynamically Accessing Subfolders
Ian Blenke
icblenke@2c2.com
Tue, 19 Oct 1999 18:14:07 -0400
On Oct 19, 1999, James W. Howe wrote:
> 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?
The method is called "objectValues". You can pass it a list of objects you
wish to enumerate within a container (an object manager).
Here's a snippet of code that will do what you want:
<dtml-with A>
<dtml-in "objectValues(['Folder'])">
<dtml-with sequence-item>
<dtml-var myName><BR>
</dtml-with>
</dtml-in>
</dtml-in>
The "with A" ties the list to start from the root - so you will always get
the full list of objects anywhere in the tree.
It's been 4 days, and I'm starting to get the hang of things :)
- Ian C. Blenke <icblenke@2c2.com> <ian@blenke.com>