[Zope] List subfolders within any folder

Thierry FLORAC thierry.florac@onf.fr
Fri, 28 Feb 2003 09:29:50 +0100


On Friday 28 February 2003 05:33, Michael Fox wrote:
> Hi *,
>
> I'm having problems with a relatively easy task. I have a DTML Method which
> contains:
>
> <dtml-in expr="objectValues('Folder')" sort="title" skip_unauthorized>
>   <li><a href="&dtml-absolute_url;"><dtml-var title_or_id></a></li>
> </dtml-in>
>
> Which when I "view" on it's own happily lists the folders within my root
> folder.
>
> Yet somehow when I reference this object with another DTML Document, it
> list nothing?!

What would you like to retrieve when you can "objectValues()" on a DTML 
Document, which doesn't contain anything ??
A DTML method is called on the object from which it is called. If you want to 
get folders contained in your DTML Document parent, you have to call, for 
example, <dtml-in "PARENTS[0].objectValues('Folder')"...> (probably with 
additional checks to know if your method is called on a folder or on a DTML 
Document).

Thierry