[PHPTAL] tal:repeat - Insert code segment after N rows
Vegard Sætrenes
vegard.saetrenes at gmail.com
Mon Oct 1 16:25:03 CEST 2007
Hello,
In connection with a redesign I consider replacing Smarty with PHPTAL.
After reading the manual and coding for a couple of days, I have still
not found out how to insert some content after N rows in a result set.
What I would like to do is something like this (the tal:condition
attribute value is pseudo code):
<tal:block tal:repeat="item some/result">
<tr>
<td tal:content="item/value1">text replaced by item/value1</td>
<td tal:content="item/value2">text replaced by item/value2</td>
<td tal:content="item/value3">text replaced by item/value3</td>
</tr>
<tr tal:condition="repeat/item/number % 5 == 0">
<td colspan="3">Some content after each fifth row</td>
</tr>
</tal:block>
Is there a way to accomplish this functionality using PHPTAL?
- Vegard
More information about the PHPTAL
mailing list