Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions /

How to add a counter on a Control Loop??


Reply


6 Posts   3818 Views

Avatar
b0bro

Community Member, 38 Posts

11 August 2009 at 12:24pm

How do i count a control loop?

Basically, i want to print some extra code every 3 times it goes through a loop.

eg

<% control LatestExhibtion %>

*** If this third time echo <br />

<% end_control %>

Avatar
Hamish

Community Member, 712 Posts

11 August 2009 at 6:21pm

cross post, see my answer on the other thread.

Avatar
teejay

Community Member, 63 Posts

15 February 2010 at 5:47pm

What other thread :)

Avatar
banal

Community Member, 901 Posts

15 February 2010 at 7:38pm

You might want to have a look at this http://ssbits.com/manipulating-every-nth-item-in-a-control-loop/

Avatar
Sean

Forum Moderator, 922 Posts

15 February 2010 at 8:54pm

SS 2.4 has <% if IsMultipleOf(3) %> which should help :)

Avatar
JRTotten

Community Member, 3 Posts

28 June 2012 at 7:48am

or $Pos if you're looking to assign a count to each item