Add Class after every 2nd record

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 9, 2015   (RSS)

By KCMedia - April 9, 2015

Hi Guys

i have section that stores testimonials and the issue is that after every 2nd record i need to add a class to the div class. on the Div <div class="one_half  animate" data-anim-type="fadeInLeft" data-anim-delay="100"> i need to add on the class so it is bold text to the right after the 2nd record so record 1 dosnt have it but the 2nd record does. <div class="one_half  last animate" data-anim-type="fadeInLeft" data-anim-delay="100">

                <?php foreach ($testimonials_listPages as $record): ?>
                <div class="one_half  animate" data-anim-type="fadeInLeft" data-anim-delay="100">
                    <div class="box">" <?php echo textLimitTestimonials ($record['content'], 300) ?><br>
                        <a href="<?php echo $record['_link'] ?>" class="button eleven">..read more</a>
                    </div>
                    
                    <div class="who">
                    
                        <?php foreach ($record['logo'] as $index => $upload): ?>
                        <img src="<?php echo $upload['thumbUrlPath'] ?>" alt="<?php echo htmlencode($record['title']) ?>" title="<?php echo htmlencode($record['title']) ?>"/>
                        <?php endforeach ?>
                        <strong><?php echo htmlencode($record['title']) ?></strong>
                        
                    </div>
                </div>
                <?php endforeach ?>

Thanks



Craig

KC Media Solutions

www.kcmedia.biz

By KCMedia - April 9, 2015

thanks Jerry

that worked great cheers.

Thanks



Craig

KC Media Solutions

www.kcmedia.biz