Hi Bruce, I'm not sure if it's the most elegant way to do it, but could try defining currentPrice with a call to REQUEST.set() rather than in the Let tag. The first REQUEST.set would initialize currentPrice (maybe not necessary?), then you could reassign the value using another REQUEST.set in your DateTime logic. Something like:
<dtml-let pricelist="parseSeminarRegistration(price_dates)">
<dtml-in pricelist> <dtml-if sequence-key> <dtml-if "_.DateTime() < _.DateTime(_['sequence-key'])"> <dtml-call expr="REQUEST.set('currentPrice',_['sequence-item'])"> </dtml-if> </dtml-if> </dtml-in>
Eric.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Bruce Eckel Sent: Wednesday, May 23, 2001 3:29 PM To: chrism@digicool.com Cc: zope@zope.org Subject: [Zope] Simple assignment (?)
I'm trying to do an assignment to a variable I created with "let" as follows:
<dtml-let pricelist="parseSeminarRegistration(price_dates)" currentPrice="pricelist[0][1]" >
<dtml-in pricelist> <dtml-if sequence-key> <dtml-if "_.DateTime() < _.DateTime(_['sequence-key'])"> <dtml-call currentPrice="_['sequence-item']"> </dtml-if> </dtml-if> </dtml-in>
The <dtml-call currentPrice="_['sequence-item']"> Doesn't work, I've tried another way or two.
I'm sure assignment must be straightforward, but I'm probably missing something obvious. Can someone enlighten? Thanks.