[Zope] Determining object type

Laurie Nason lnason@bcm.tmc.edu
Wed, 6 Mar 2002 10:29:20 -0600


Hi
Try the following....

<dtml-in expr="(objectValues(['type1','type2'])">
   <dtml-if expr="meta_type=='type1'">
        processing
  <dtml-else  {type2 by default}>
        processing
  </dtml-if>
</dtml-in>

hth
Laurie

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Sherman Lambert (State Office)
Sent: Wednesday, March 06, 2002 10:26 AM
To: zope@zope.org
Subject: [Zope] Determining object type


Hey there,

I have a in loop which iterates over two different types of objects.  I need
to know which type of object I am dealing with in each iteration.  This
can't be hard , but I cannot find it in the docs.

<dtml-in expr="(objectValues('type1')) + (objectValues('type2')">
   <dtml-if {I want type 1 here}>
        processing
  <dtml-else  {type2 by default}>
        processing
  </dtml-if>
</dtml-in>

TIA
Sherman


_______________________________________________
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 )