Burchill, Scott B. writes:
 > ....
 > I am finding myself doing the following and am sure
 > there is a simpler way to do this.
 > 
 > Any help would be greatly appreciated!  Thanks.
 > 
 > <dtml-with bid_records>
 >   <dtml-if "_.str(REQUEST.form['selection']) == 'walkon'">
 >     <dtml-with walkon>
 >       <dtml-call "REQUEST.set('cur_bidder', bidder)">
 >     </dtml-with>
 >   <dtml-elif "_.str(REQUEST.form['selection']) == 'fullhouse'">
 >     <dtml-with fullhouse>
 >       <dtml-call "REQUEST.set('cur_bidder', bidder)">
 >     </dtml-with>
 >   <dtml-else>
 >     <dtml-with snoopy>
 >       <dtml-call "REQUEST.set('cur_bidder', bidder)">
 >     </dtml-with>
 >   </dtml-if>
 > </dtml-with>
If you are sure, that only these values can occur in
"selection" (as I expect, as otherwise, it would not be a selection),
then you can use:

<dtml-call "REQUEST.set('cur_bidder',_.getitem(REQUEST.form['selection']).bidder)">


Dieter

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
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 )

Reply via email to