[Zope] - Discovering sub-folders names and proprieties

Amos Latteier amos@aracnet.com
Mon, 28 Dec 1998 14:38:05 -0800


At 07:42 PM 12/28/98 -0300, Paulo Eduardo Neves wrote:
>How can I get the subfolders names and proprieties (e.g. title) from
>DTML?

Check out the online help's Object Reference. You can get to it from the
'Help' tab on the management screen. The method you are looking for is
probably 'objectValues' which returns a list of sub-objects of a given type. 

For example to get a list of the titles of all sub-Folders try this:

  <!--#in expr="objectValues(['Folder'])"-->
  <!--#var title_or_id-->
  <!--#/in-->

Basically this iterates though a list of sub-objects of meta-type 'Folder'.
For each object it calls its 'title_or_id' method.

DTML can be complex, and combining it with Zope's fairly complex API makes
it even tougher. I suggest reading the Object Reference for specific
questions and reading the Zope's How-To collection for some examples.

http://www.zope.org/Documentation/HowTo

Also don't forget that you can use the 'DTML Source' link at the bottom of
every page on the Zope site to see that page's DTML. Not that my DTML is so
great, but it might give you some ideas.

Good luck.

-Amos