[vox-tech] Zope (DTML) - sequence or int handling

David Siedband vox-tech@lists.lugod.org
Mon, 23 Jun 2003 14:19:58 -0700


I have a DTML page where users can choose location(s) to link to a 
hypothesis.  So there's an HTML multiple selection field.  I have code 
that calls SQL to insert multiple selections and code that calls the 
SQL insert for a single entry.  My question is how do get Zope to 
differentiate between the two scenarios and use the appropriate code.  
It's some sort of <dtml-if >  logic...

This tag calls the SQL query to inset a single selection
       <dtml-call "queries.updateHypPlace()">

This code iterates through the sequence and calls the SQL to insert 
each one
     <dtml-in place prefix=obj>
       <dtml-call "queries.updateHypPlace(place=obj_item , huid=hid)">
     </dtml-in>

What I have in mind is

<dtml-if ????>
     <dtml-call "queries.updateHypPlace()">
<dtml-else ????>
     <dtml-in place prefix=obj>
       <dtml-call "queries.updateHypPlace(place=obj_item , huid=hid)">
     </dtml-in>
</dtml-if>

Suggestions?

TIA,

David