[Zope] image objects into table via python script

bruno bruno at modulix.org
Thu Nov 18 04:28:57 EST 2004


John Schinnerer a écrit :
> Hello,
> 
> --- Tino Wildenhain <tino at wildenhain.de> wrote:
>  
> 
>>Well, what would be wrong if you use:
>>
>><table>
>> <tr>
>>   <td tal:repeat="item here/thescript"
>>tal:content="item/formattettime />
>> </tr>
>></table>
>>
>>or even repeat over tr is you need...
> 
> 
> My complication is that I need a 2-D table with a fixed number of
> columns.
> I don't know how (if?) I can do that using TAL.
> 
> If I iterate on <tr> I get just one column.
> If I iterate on <td> I get just one row.
> 
> What I need is for example five columns per row, with rows added until
> the iteration is done.

<tr tal:repeat="row here/get_rows">
   <td tal:repeat="cell row/get_cells"
       tal:content="structure cell/get_content">
     dummy
   </td>
</tr>

Now you just have to s/ get_rows, get_cells etc with whatever fits your 
needs. The 'five columns per row' problem is a responsability of 
row.get_cells().

HTH
Bruno
-- 
bruno
bruno at modulix.org
-- 


More information about the Zope mailing list