Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
Hi

I am seeing if there is a way to add a empty col-sm-4 div within repeatable region, the coding before couch is integrated looks like the following

Code: Select all
<div class="row">
                    <div class="col-sm-4">
                        <div class="repair-latest xs-margin">
                            <div class="repair-latest-thumbnail margin-bottom-40">
                                <a href="#">
                                   <img src="images/networking.jpg" alt="">
                                </a>
                            </div>
                            <h4 class="repair-latest-title"><a href="#">Network</a></h4>
                        </div> <!-- end .repair-latest  -->
                    </div> <!-- end .col-sm-4  -->
                    <div class="col-sm-4">
                        <div class="repair-latest xs-margin">
                            <div class="repair-latest-thumbnail margin-bottom-40">
                                <a href="#">
                                   <img src="images/support.jpg" alt="">
                                </a>
                            </div>
                            <h4 class="repair-latest-title"><a href="#">Support</a></h4>
                        </div> <!-- end .repair-latest  -->
                    </div> <!-- end .col-sm-4  -->
                    <div class="col-sm-4">
                        <div class="repair-latest xs-margin">
                            <div class="repair-latest-thumbnail margin-bottom-40">
                                <a href="#">
                                  <img src="images/network-installation.jpg" alt="">
                                </a>
                            </div>
                            <h4 class="repair-latest-title">
                               <a href="#">Network Installation</a>
                            </h4>
                        </div> <!-- end .repair-latest  -->
                    </div> <!-- end .col-sm-4  -->
                </div> <!--  end .row  -->
               
                <div class="row">
                   
                    <div class="col-sm-4">
                        <div class="repair-latest xs-margin">
                            <div class="repair-latest-thumbnail margin-bottom-40">
                                <a href="#">
                                  <img src="images/offsite-backup.jpg" alt="">
                                </a>
                            </div>
                            <h4 class="repair-latest-title">
                               <a href="#">Offsite Secure Data Backup</a>
                            </h4>
                        </div> <!-- end .repair-latest  -->
                    </div> <!-- end .col-sm-4  -->
                   
                    <div class="col-sm-4 hidden-xs">
                        &nbsp;
                    </div>
                   
                    <div class="col-sm-4">
                        <div class="repair-latest xs-margin">
                            <div class="repair-latest-thumbnail margin-bottom-40">
                                <a href="#">
                                  <img src="images/telephony-integration.jpg" alt="">
                                </a>
                            </div>
                            <h4 class="repair-latest-title">
                               <a href="#">Telephony Systems Integration &amp; Installation</a>
                            </h4>
                        </div> <!-- end .repair-latest  -->
                    </div> <!-- end .col-sm-4  -->
                   
                </div>


I can create the coding above without the empty col-sm-4 div using repeatable region but unsure how to add it into the repeatable coding. The coding with couch integrated is below

Code: Select all
<cms:show_repeatable 'services_boxes' >
                        <cms:set my_count="<cms:zebra '1' '2' '3' />" />
                            <cms:if my_count='1'>
                                <div class="row">
                                    </cms:if>
                                <div class="col-sm-4">
                                    <div class="repair-latest xs-margin">
                                        <div class="repair-latest-thumbnail margin-bottom-40">
                                           <a href="#">
                                           <img src="<cms:show box_image/>" alt="">
                                            </a>
                                        </div>
                                        <h4 class="repair-latest-title"><a href="#"><cms:show box_heading/></a></h4>
                                    </div>
                                </div>
                                   <cms:if my_count='3' || k_count=k_total_records>         
                                </div>
                                  </cms:if>
                    </cms:show_repeatable>


Has anyone any ideas how to achieve this please? Thank you in advance
UPDATE: I managed to solve it with the help of this post and following same sort of thing, I added the following code in

Code: Select all
<cms:if k_count='4'>
<div class="col-sm-4">&nbsp;</div>
</cms:if>


So the whole block of code is now below, in case anyone is looking to do the same sort of thing

Code: Select all
<cms:show_repeatable 'services_boxes' >
                        <cms:set my_count="<cms:zebra '1' '2' '3' />" />
                            <cms:if my_count='1'>
                                <div class="row">
                                    </cms:if>
                                <div class="col-sm-4">
                                    <div class="repair-latest xs-margin">
                                        <div class="repair-latest-thumbnail margin-bottom-40">
                                           <a href="#">
                                           <img src="<cms:show box_image/>" alt="">
                                            </a>
                                        </div>
                                        <h4 class="repair-latest-title"><a href="#"><cms:show box_heading/></a></h4>
                                    </div>
                                </div>
                                <cms:if k_count='4'>
                                        <div class="col-sm-4">&nbsp;</div>
                                    </cms:if>
                                   <cms:if my_count='3' || k_count=k_total_records>
                                </div>
                                  </cms:if>
                    </cms:show_repeatable>
2 posts Page 1 of 1
cron