[Zope] How can folder address its contents?
Robert W. Erb
rerb@progress.com
12 Dec 1999 17:18:27 -0500
Excellent. Thanks, Jeff. This works:
> <dtml-in "foldername.objectValues()">
> <dtml-var id>
> <dtml-else>
> Nothing in folder.
> </dtml-in>
"Jeff K. Hoffman" <jkhoffman@carolina.rr.com> writes:
> On Sat, 11 Dec 1999, Phil Harris wrote:
>
> > Try something like
> >
> > <dtml-in foldername>
> > <dtml-var id>
> > <dtml-else>
> > Nothing in folder.
> > </dtml-in>
>
> I just tried this on my Zope and, unless I did something wrong, it did not
> work. It failed with:
>
> Error Type: TypeError
> Error Value: hasattr, argument 2: expected string, int found
>
> What has always worked for me is:
>
> <dtml-in "foldername.objectValues()">
> <dtml-var id>
> <dtml-else>
> Nothing in folder.
> </dtml-in>
>
> If you want only the folders contained in foldername:
>
> <dtml-in "foldername.objectValues(['Folder'])">
> ...
> </dtml-in>
>
> If you want folders and DTML Methods:
>
> <dtml-in "foldername.objectValues(['Folder', 'DTML Method'])">
> ...
> </dtml-in>
>
> And so on.
>
> --Jeff
>
--
. . . . . . . . . . . . . . . .
.
. Bob Erb
.
. I don't want to die today!