[Zope] alternating colors based on sequence-index of outer loop
John Hunter
jdhunter@ace.bsd.uchicago.edu
Mon, 25 Mar 2002 07:51:14 -0600
>>>>> "hans" == hans <hans@beehive.de> writes:
hans> There is a prefix attribute to dtml-in, which allows you to
hans> name the different sequence iterators.For details see
hans> http://www.zope.org/Members/michel/ZB/AppendixA.dtml cheers
Thanks, that is exactly what I am looking for. I am, however, having
trouble using the sequence-var-variable syntax with prefixes from the
outer loop. Eg, section_var_id gives a key error in the example
below
<dtml-in expr="Sections.objectValues('Section')"
prefix="section">
<dtml-in expr="_['section_item'].objectValues('Student')"
prefix="student" sort="last_name">
<tr>
<dtml-if student_start>
<th rowspan=<dtml-var student_length>><dtml-var section_var_id></th>
</dtml-if>
...[snip]...
</tr>
</dtml-in>
</dtml-in>
although I can still access that value with
<dtml-var expr="_['section_item'].id">
Am I missing the syntax, or is there a problem using prefixes with the
sequence-var-variable syntax?
Thanks for your help,
John Hunter
Zope 2.5.1b1