Edward Ver Posted September 3 Share Posted September 3 (edited) I have multiple layers on repeaters which must have unique or descending numbers. How do you it in processwire? I'm still new to Processwire, and it looks promising so far. I just need an auto numbering for ex: slider-layer-[Code here]. <div id="slider-layer-1">Layer 1</div> <div id="slider-layer-2">Layer </div> <div id="slider-layer-3">Layer 3</div> Thanks Edited September 3 by Edward Ver Link to comment Share on other sites More sharing options...
Robin S Posted September 3 Share Posted September 3 Something like this: $i = 1; foreach($page->my_repeater_field as $item) { echo "<div id='slider-layer-$i'>Layer $i</div>"; $i++; } 2 1 Link to comment Share on other sites More sharing options...
Edward Ver Posted September 24 Author Share Posted September 24 Thanks a lot. Very much appreciated. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now