This sounds silly and basic but I've been struggling with it for a while so, I need help...
All I'm trying to do is output some zero-based index values for some tags I need for my carousel object. These index pictures. I've got everything working except I can't find a simple way to output a zero-based value for the $Pos bit in the code below:
<ol id="carousel-controls" class="carousel-indicators">
<% loop $Photos %>
<li data-target="#myCarousel" data-slide-to="$Pos-1"></li>
<% end_loop %>
</ol>
This will (obviously) output data-slide-to values that look like 1-1, 2-1, 3-1, and not 0 1 2, like I want. Any ideas how to fix this?
I tried using {$Pos-1} but that seemed to cause a syntax error. I guess I misunderstood the docs there.
I don't think I can use a function because the value would be cached... wouldn't it?
I'm confused. Help please?