I'm working with repeatable regions that can have anywhere from 1 to over 35 fields...
Can I insert a "break" or any other element between repeatables when displaying the values?
Let's say I'm displaying 10 repeatable images and I'd like to create a break after every 2 images. Tried a couple chunks of code I've found here on the forum, have come close but no cigar:
1.
2. Or what about to display an html element every 5 images? Tried this but no go.
Do you think anyone can maybe point me in the right direction?
Thanks a lot!
-Izzy
Can I insert a "break" or any other element between repeatables when displaying the values?
Let's say I'm displaying 10 repeatable images and I'd like to create a break after every 2 images. Tried a couple chunks of code I've found here on the forum, have come close but no cigar:
1.
- Code: Select all
<cms:show_repeatable 'images' >
<cms:set num = "<cms:mod k_count '2'/>"/>
<cms:if num == '1'>
<div class="hidden-xs hidden-sm row">
</cms:if>
<div class="col-sm-6">
<h3><cms:show image_text /></h3>
<img src="<cms:show image />" />
</div> <!-- end col -->
<cms:if num == '0' || k_count == k_total_records>
</div> <!-- end row -->
</cms:if>
</cms:show_repeatable>
2. Or what about to display an html element every 5 images? Tried this but no go.
- Code: Select all
<cms:show_repeatable 'images' >
<cms:if k_count == '5'>
<a class="btn" href="#" role="button">Hi</a>
</cms:if>
<div class="col-sm-6">
<h3><cms:show image_text /></h3>
<img src="<cms:show image />" />
</div> <!-- end col -->
</div> <!-- end row -->
</cms:show_repeatable>
Do you think anyone can maybe point me in the right direction?
Thanks a lot!
-Izzy