[Zope] - Re : Problem with iteration

Brian Lloyd Brian@digicool.com
Wed, 27 Jan 1999 09:17:00 -0500


> Thanks Mike, 
> 
> I tried also _['sequence-item'] and it 
> works? 
> 
> In fact, I aim to construct a select 
> popup using these sequence-items but 
> add the attribut 'SELECTED' only to an 
> item equal to certain a variable 
> coming from previous form.
> 
> So in my test,  _['sequence-item'] 
> should be evaluate against this 
> variable, <!--#var  day-->.  For the 
> test I declared and attributed the 
> variable 'day' in a propriety of  my 
> folder. 
> 
> DTML file 
> ====== 
> > <!--#in test2-->  
> >   <!--#if "_vars['sequence-item'] == 
> <!--#var day-->"-->  
> >     <!--#var sequence-item-->  
> >   <!--#/if-->  
> > <!--#/in-->  
> 
> And there, no error file, only an 
> empty htlm file. 
> For the test, I am pretty sure that 
> 'day' is a possibility of  
> _vars['sequence-item'] . 
> 
> FR.

You're _almost_ there - you cant use a dtml tag inside
of another dtml tag, though. Try:

<!--#in test2-->  
  <!--#if "_vars['sequence-item'] == day"-->
    <!--#var sequence-item-->  
  <!--#/if-->  
<!--#/in-->  


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com