[Zope] Casting to a list
Ken Kinder
kkinder@messagemedia.com
Wed, 22 Mar 2000 11:31:04 -0700
Another question (soon I'll start answering more on this list :) - I
have a set of checkboxes with the same name that I iterate through
using dtml-in. However, when only one checkbox is checked, dtml-in
complains that a string cannot be used as input, it expects a
sequence. My initial thought was to do this:
<dtml-if "type(var) == type('')">
... (do not iterate)
<dtml-else>
<dtml-in var>
...
</dtml-in>
</dtml-if>
How can I either cast a string to a list w/o messing up an existing
list, or gain access to Python functions such as type() from a
dtml-if statement?
--
Ken Kinder
303.381.7631