I try to run the loop only 3 times, no matter how much it had.
<% loop $ChildrenOf(Sponsors) %>
<li>
<a href="$TargetURL" target="_blank">
<img src="$Logo.Link" alt="image" />
</a>
</li>
<% end_loop %>
What I thought about what I am doing is declaring a counter variable, and if it falls into 3 call breaks, however, when I do this:
<% $counter = 0 %>
page breaks, this does not cause any errors, but any line of code after that does not work.
How can I make this cycle break after it starts 3 times?
Bojan source
share