I know there has to be a much better way to do this, but I wasn't able to find anything in the forums or documentation on how to do this properly. I have a repeatable region and on every 3,5,7 and so on columns I have to add an opening div tag and on every 2,4,6 etc. columns I have to add an </div> tag. Here is how I have it now (which works sort of), but it obviously won't grow with more than 9 columns.
- Code: Select all
<cms:show_repeatable 'team_member' >
<cms:if k_count='1' || k_count='3' || k_count='5' || k_count='7' || k_count='9'>
<div class="flex row">
</cms:if>
<div class="col-md-6 padding-bottom-60 clearfix">
<div class="doctors-img">
<img src="<cms:show team_image />" width="309" alt="<cms:show name />" title="<cms:show name />" class="img-responsive">
<cms:show plusdoc />
</div>
<div class="doctors-detail">
<h4><cms:show name /><span><cms:show role /></span></h4>
<p><label class="heading">Speciality</label><label class="detail"><cms:show special /></label></p>
<p><label class="heading">Bio</label><label class="detail"><cms:show bio /></label></p>
<p><label class="heading">More</label><label class="detail"><cms:show more /></label></p>
</div>
</div>
<cms:if k_count='2' || k_count='4' || k_count='6' || k_count='8'>
</div><!-- end flex row -->
</cms:if>
</cms:show_repeatable>