I have a loop within a loop: looping through sub-pages and arrays contained within. Within the inner loop, I'm checking to see if object an position has a bool set to TRUE.
<% loop $Menu(1) %>
<% if ClassName = Gallery %>
<% loop $Children %>
<% if $isHero %>
THE POS:
$Pos
<div class="item">
<div class="center">
<a href="$URL"><img src="$Photograph.Link" class="full-width img-responsive" alt="" /></a>
</div>
</div>
<% end_if %>
<% end_loop %>
<% end_if %>
<% end_loop %>
So, I only output HTML if the inner condition is met. However, I also want to add a class -- .active -- to the first DIV but as the object is not necessarily the first in its array, I can't use $First or $Pos.
Is there any way to check the iteration of the loop instead of the index of the object?