[Zope] Determining object type

Phil Harris phil@harris-family.info
Wed, 6 Mar 2002 16:30:30 -0000


<dtml-in expr="(objectValues('type1')) + (objectValues('type2')">
   <dtml-let mt="_.getitem('meta_type')">
   <dtml-if "mt=='type 1'">
        processing
  <dtml-else>
        processing
  </dtml-if>
  </dtml-let>
</dtml-in>

----- Original Message -----
From: "Sherman Lambert (State Office)" <sherman.lambert@state.co.us>
To: <zope@zope.org>
Sent: Wednesday, March 06, 2002 4:25 PM
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 )