[Zope] Variable name use in with statement

Spicklemire, Jerry Jerry.Spicklemire@IFLYATA.COM
Fri, 13 Oct 2000 14:58:17 -0500


Scott Butchill wonders if:

"there is a simpler way to do this."

Not much simpler, but how about:

<dtml-call "REQUEST.set('user_select', ['walkon', 'fullhouse'])">
<dtml-with bid_records>
 <dtml-in user_select>
  <dtml-if "_.str(REQUEST.form['selection']) == _['sequence-item']">
   <dtml-with "_['sequence-item']">
    <dtml-call "REQUEST.set('cur_bidder', bidder)">
   </dtml-with>
  <dtml-elif "_['sequence-index'] == -1>
   <dtml-with snoopy>
    <dtml-call "REQUEST.set('cur_bidder', bidder)">
   </dtml-with>
  </dtml-if>
 </dtml-in>
</dtml-with>