[Zope] How to check type of variable in DTML

Schmidt, Allen J. aschmidt@nv.cc.va.us
Wed, 8 May 2002 08:55:05 -0400


I am passing a variable to a ZSQL method and I need to check whether its a
string or a list before it is part of a WHERE statement. How can I check
this? 

<dtml-if mk>
  CMAKE IN ( <dtml-var "mk[1:-1}"> )
</dtml-if>

This works well if its a list but blows up if just a string.
Needs to be like this:

<dtml-if mk is_A_list>
  CMAKE IN ( <dtml-var "mk[1:-1}"> )
<dtml-else>
  <dtml-var sqltest mk column=CMAKE type=nb optional>
</dtml-if>


Thanks

-Allen