I am trying to hide and unhide a section on my website with couch if statements and am not able to figure out where I am going wrong.
Here are the editable regions:
Here is the section I am trying to hide/show:
Here are the editable regions:
- Code: Select all
<cms:editable name='testimonial_enable' label='Enable Testimonial' opt_values='Enable=1 || Disable=0' type='radio' group='product_testimonial' order='9'/>
<cms:repeatable name='product_testimonials' label='Testimonials' required='0' group='product_testimonial'>
<cms:editable name='testimonial_name' label='Name' required='0' type='text' group='product_testimonial' order='2'/>
<cms:editable name='testimonial_quote' label='Quote' required='0' type='textarea' group='product_testimonial' order='3'/>
</cms:repeatable>
Here is the section I am trying to hide/show:
- Code: Select all
<cms:if "<cms:get_custom_field 'testimonial_enable' masterpage='store.php'/>">
<section class="section">
<div class="container-fluid">
<div class="section-header">
<h1>
Customer <small class="light">Testimonials</small>
</h1>
</div>
<div class="row-fluid">
<div class="tabbable tab-pills span12">
<ul class="nav nav-pills nav-stacked span2">
<cms:show_repeatable 'product_testimonials' >
<li <cms:if k_count = '1'>class="active"</cms:if>>
<a data-toggle="tab" href="#pill-tab<cms:show k_count/>"><cms:show testimonial_name/></a>
</li>
</cms:show_repeatable>
</ul>
<div class="tab-content span10">
<cms:show_repeatable 'product_testimonials' >
<div class="tab-pane <cms:if k_count = '1'>active</cms:if>" id="pill-tab<cms:show k_count/>">
<h3><cms:show testimonial_name/> Testimonial</h3>
<p><cms:show testimonial_quote/></p>
</div>
</cms:show_repeatable>
</div>
</div>
</div>
</div>
</section>
</cms:if>