Forum
Add number to repeater
I want to create a repeater that will add a class with a number, like this;
<div class="item-1">
<p>Some Content</p>
</div>
<div class="item-2">
<p>Some Content</p>
</div>
so that each use of the template is identifiable by it's class.
Anyone know if/how this is possible?
Many thanks,
Ian
EDITED:
I think you probably want:
unless I've misunderstood.
perch_item_index
will give the index of the item within the repeater, andtype="hidden"
will stop the tag showing up as an editable field.Ahh, yes. I did miss that. Thanks Drew. I better stop trying to help while on my iPhone as I miss too much :(
I'm going to edit my reply above.
Thanks Drew, that was exactly what I needed. Thank you for getting back to me on a Sunday, much appreciated.