[ZPT] Fiddly repeat
Charlie Clark
charlie at begeistert.org
Tue Sep 23 14:37:39 EDT 2003
Dear list,
I'd like to be able to loop through a result-set in a table and have say
three columns per row for the same results. What is the best way to do
this? I've tried the following which for pretty obvious reasons doesn't
work.
<table tal:define="items here/query">
<div tal:repeat="item items">
<tr tal:condition="python: test(repeat['item'].number() % 3 == 0, 1 ,0)">
<td tal:content="item/value"></td>
</tr>
</div>
</table>
Are there any alternatives using tal or is it best to do this in a
PythonScript?
Thanx for any suggestions.
Charlie
More information about the ZPT
mailing list