[Zope] objectValues type?

Rik Hoekstra rik.hoekstra@inghist.nl
Mon, 6 Nov 2000 14:59:43 +0100


I have this simple tree:

<dtml-tree branches="objectValues" skip_unauthorized="1">
    <input type="checkbox" name="delItems:list" VALUE="<dtml-var id>">
    <a target=main href="&dtml-absolute_url;"><dtml-var title_or_id></a>
 </dtml-tree>

The anchor's target is main. But it if it is a Folder I want the target to
be self.

And I want to skip some items.

How do I return the objectType (eg Folder, Document, Method) so I can alter
the anchor, and/or object Properties that I might set to make other
decisions?


try (untested):

<dtml-tree branches="objectValues" skip_unauthorized="1">
<input type="checkbox" name="delItems:list" VALUE="<dtml-var id>">
<dtml-if  "meta_type != 'Folder'">
<a href="&dtml-absolute_url;"><dtml-var title_or_id></a>
<dtml-else>
<a target=main href="&dtml-absolute_url;"><dtml-var title_or_id></a>
</dtml-else>
 </dtml-tree>

with the dtml-if tag you can test for other properties in the same way.

hth

Rik