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>