[ZPT] table loop
Georges J Baladi Jr
Georges J Baladi Jr" <georges@madisoncomunicacao.com.br
Wed, 15 Aug 2001 15:36:59 -0300
This is a multi-part message in MIME format.
------=_NextPart_000_027A_01C125A0.1F8109F0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I have the follow situation:
a folder with 19 images
a page template that display the images inside a table. I want to put 5 =
images in a row.
I try this:
<table width=3D"100%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0">
<tr tal:repeat=3D"thumb python:here.conteudo.objectValues('Image')" =
tal:omit-tag=3D"python:path('repeat/thumb/index')%5!=3D0">
<td><img src=3D"/images/papel/campeonato.jpg" width=3D"100" =
height=3D"75" tal:replace=3D"structure thumb"></td>=20
</tr>
</table>
but omit-tag remove the start AND the end tr when the condition is true =
and my page display 4 rows (one with 1 image, 1 with 4 images, 1 with 1 =
image and 1 with 4 images). I tried with tal:condition to, but I can=B4t =
do what I want. Can I control the start OR the end tag?
I think Zope and ZPT are the best solution for web publishing. It=B4s an =
excellent software.
thanks,
Georges Baladi
------=_NextPart_000_027A_01C125A0.1F8109F0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have the follow =
situation:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>a folder with 19 =
images</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>a page template that display the images =
inside a=20
table. I want to put 5 images in a row.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I try this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><table width=3D"100%" border=3D"0" =
cellspacing=3D"0"=20
cellpadding=3D"0"><BR> <tr tal:repeat=3D"thumb=20
python:here.conteudo.objectValues('Image')" tal:omit-tag=3D"python:p=
ath('repeat/thumb/index')%5!=3D0"><BR> =20
<td><img src=3D"/images/papel/campeonato.jpg" width=3D=
"100"=20
height=3D"75" tal:replace=3D"structure thumb"></td> =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </tr></FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </table></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>but omit-tag remove the =
start AND the end=20
tr when the condition is true and my page display 4 rows (one with 1 =
image, 1=20
with 4 images, 1 with 1 image and 1 with 4 images). I tried with =
tal:condition=20
to, but I can=B4t do what I want. Can I control the start OR the =
end=20
tag?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I think Zope and ZPT are the best =
solution for web=20
publishing. It=B4s an excellent software.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Georges Baladi</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_027A_01C125A0.1F8109F0--