Thanks alot! Worked like a charm(used the last example since I found that
one simpler to understand)!

/Marcus


> Hi,
>
> This is one of the cases where TAL is a bit strange to work with. The
> following should work even if the HTML generated is not standards compliant.
>
> <tal:block repeat="image images">
>   <tal:block tal:replace="structure '&lt;tr&gt;'"
> tal:condition="php:repeat.image.index % 5 == 0" />
>   <td>
>     <img src="${image/src}" />
>   </td>
> </tal:block>
>
> Another option (better in my opinion) would be to split the list in chunks:
>
> <tr tal:repeat="chunk php:array_chunk(images, 5)">
>   <td tal:repeat="image chunk">
>     <img src="${image/src}" />
>   </td>
> </tr>
>
> ciao,
> /imv
>
>
-- 
Tanax
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to