[ZPT] suggestion: content and/or silent repeat

Peter Bengtsson mail@peterbe.com
Wed, 1 Aug 2001 14:38:50 +0200


>       <table border="1" width="100%">
>         <tr>
>           <th>#</th><th>Id</th><th>Meta-Type</th><th>Title</th>
>         </tr>
>         <tbody tal:repeat="item container/objectValues">
>           <tr bgcolor="#EEEEEE" tal:condition="repeat/item/even">
>             <td tal:content="repeat/item/number">#</td>
>             <td tal:content="item/id">Id</td>
>             <td tal:content="item/meta_type">Meta-Type</td>
>             <td tal:content="item/title">Title</td>
>           </tr>
>           <tr tal:condition="repeat/item/odd">
>             <td tal:content="repeat/item/number">#</td>
>             <td tal:content="item/id">Id</td>
>             <td tal:content="item/meta_type">Meta-Type</td>
>             <td tal:content="item/title">Title</td>
>           </tr>
>         </tbody>
>       </table>
>
> This seems surprisingly clunky for the graceful ZPT system--it produces
> multiple tbody groupings incorrectly.

I personally think this is very good piece of code.
Somewhat clunky with the too odd/even conditions but cool if you open the
code in Dreamweaver.

But, like you said "forgive a newbie"

Cheers, Peter