[Zope] Non short-circuit or statement (listing multiple
document categories)
Tino Wildenhain
tino@wildenhain.de
Tue, 03 Jul 2001 16:15:15 +0200
Hi Frank,
you probably want
<dtml-in expr="objectValues(['STX_Document','Page Template','DTML
Document'])" ...
objectValues() takes empty arguments, so it lists all meta-types,
a string, so it lists only the matching meta-type or a list of
meta-type strings, so it lists all matching objects.
(Unfortunately the meta-type system is somewhat brain-dead since
it does not support filtering on superclasses, but this is not
your problem here)
Regards
Tino
--On Dienstag, 3. Juli 2001 14:27 +0200 Frank Sonnemans
<fs.mail@wanadoo.be> wrote:
> What is the correct way to generate a list of documents of several types?
>
> I used the following statement, which only lists the documents of the
> first category matched.
>
> <dtml-in expr="objectValues('STX_Document') or objectValues('Page
> Template') or objectValues('DTML Document')"
> sort="bobobase_modification_time" reverse>
>
> So if there are no STX_Document's the Page Template's get listed, but not
> the DTML Documents.
>
> Regards,
>
>
> Frank
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )