Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
I have a repeatable region for an FAQ section on my site. I need to detect the first region and then display a CSS class if it exists. The code below adds the class to every region.

Code: Select all
<cms:pages masterpage='campaign-globals.php'>
                           <div class="col-md-8 col-md-offset-2 left-faqs">
                              <ul id="accordion" class="panel-group controls">
                                 <cms:show_repeatable 'faq' startcount='1'>
                                    <li class="active <cms:if k_count='1'>opend</cms:if>">
                                       <h3 class="action"><cms:show qq /></h3>
                                       <div class="panel-content">
                                          <p><cms:show aa /></p>
                                       </div>
                                    </li>
                                 </cms:show_repeatable>
                              </ul>
                           </div><!-- end left faqs -->
                        </cms:pages>
Hi Ton,

Please temporarily drop a <cms:dump /> tag within the repeatable tag block - you'll see all the variables available for use. I'm sure you'll spot the one you need to target the first row.
2 posts Page 1 of 1