[ZPT] repeat / replace|content combination

Evan Simpson evan@digicool.com
Tue, 10 Apr 2001 21:59:07 -0400


From: <richard@bizarsoftware.com.au>
> Another solution, which is invalid HTML AFAIK:
> 
> <tr class="altline" tal:repeat="l here/someList">
>  <div tal:replace="structure l/tableRow">
>   <td>dummy</td>
>   <td>row</td>
>   <td>data</td>
>  </div>
> </tr>

This is where tal:replace="nothing" comes in handy:

<tr class="altline" tal:repeat="l here/someList">
 <td tal:replace="structure l/tableRow">dummy</td>
 <td tal:replace="nothing">row</td>
 <td tal:replace="nothing">data</td>
</tr>

There used to be a tal:omit, but this reads just as well, I think.

Cheers,

Evan @ digicool