[Zope] tal loop to render table
Andreas Jung
lists at zopyx.com
Wed Nov 29 14:01:51 EST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- --On 29. November 2006 19:54:34 +0100 Dennis Schulz <d.schulz81 at gmx.net>
wrote:
> I would like to build a tal loop that renders a list of elements (widgets
> in my case) in a table.
> (for example I have a list of 9 items, then it renders a table: five rows
> with 2,2,2,2,1 items)
> the table has 2 columns, so i would need to open and close the table row
> every second item.
> I tried to check with a condition if the row is odd or even, but unopened
> and unclosed tags are not valid.
>
> Is there any possibiliy to do this with tal?
>
<div tal:replace="structure python: '<sometag>'" />
But you would better check if you really can't simplify your logic.
- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFFbdkgCJIWIbr9KYwRAhisAKCl+TfjUzdlyWMDS5tEQuF+8QoRigCeLJ8q
fW77mKuOFVteXrNNkGsTMEs=
=wOrG
-----END PGP SIGNATURE-----
More information about the Zope
mailing list