[ZPT] Referencing Lists with TAL

Evan Simpson evan@zope.com
Tue, 23 Oct 2001 11:13:10 -0400


Amy Schmidt wrote:

> I would like to use TAL to reference a list of lists
> returned by my python script. Here's an example of the
> object being returned (1 list that contains 2 other
> lists):
> [['A','B','C'],[1,2,3]]
 

I think this is what you want:

<span tal:define="global opts
python:here.objects.vach_opts_logic()"></span>
<select tal:repeat="o opts">
 <option tal:repeat="o2 o" tal:content="o2">Option</option>
</select>


This repeats the 'select' for each list, and the 'option' for each list element.


Cheers,

Evan @ Zope