What you're looking for is $Pos or $MultipleOf.
<% loop Objects %>
$title
<% if Pos = 3 %>
<br /> Position #3
<% end_if %>
<% if MultipleOf(3) %>
<br /> each third iteration
<% end_if %>
<% end_loop %>
http://doc.silverstripe.org/framework/en/reference/templates#looping-over-lists
Posted to: Gridfield loop and count in template | Show Thread | Post Reply