[ZPT] repeat structure and tal:define

Nguyen, Joe Joe.Nguyen at coair.com
Mon Mar 15 19:11:20 EST 2004


Hi, 

 

I hope this is the correct maillist.  If not, please accept my apologies and
direct me to the correct list.

 

I have a problem with defining a variable.  My code.

 

<a href = "http://XXX/exam_edit/edit_exam_questions">

   <p tal:repeat = "item context/exam_edit/exam_edit_scripts/retrieveExams" 

      tal:content="item"

   </p>

</a>

 

"retrieveExams" returns a list of names like so,  listOfTestNames =
['test1', 'test2', 'test3'].

 

When I loop through the list, I am able to print out the test names.  The
problem I am having is setting those names to another variable as I go
through the list.  I've tried "tal:define="names item", "tal:define="names
request/item", and many other ways but it doesn't seem to work for me.  I
hope someone can shed some light into this problem I'm having. Again, sorry
if it's the wrong list, and hope that I was clear about things.

 

Joe

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zpt/attachments/20040315/faab43d3/attachment.html


More information about the ZPT mailing list