[Zope] tal:repeat question
Kevin Carlson
khcarlso@bellsouth.net
Wed, 19 Feb 2003 16:30:26 -0500
After all the recent discussion around TAL, I've decided to finally take
the time to get to know it better. So far, I must admit it's a lot
easier than I thought it was from the looks of it and I have been able
to convert almost an entire small site to TAL in an evening. However,
one small puzzle remains for now.
I wish to display a group of pictures in a 3 by 3 table. I'm currently
doing that with the following dtml. Can anyone suggest how to do this
in TAL? I've searched the archives and haven't been able to turn up
anything that helps...
<table>
<dtml-in expr="objectValues('Image')" size=9 start=query_start>
<dtml-if expr="_['sequence-index'] % 3 == 0">
<dtml-if expr="_['sequence-index'] > 0">
</tr>
</dtml-if>
<tr width="33%">
</dtml-if>
<td class="photo_title"><dtml-var sequence-item></td>
</dtml-in>
</table>
I know one way would be to call a python script that populated a list of
lists containing the necessary objectValues, but I am curious as if that
is the most efficient and/or only way.
Thanks,
Kevin