Is there a way where a div can have different code if there is no content for another div, for example the current code is below
I'm thinking if there is no content in the second div
I thought I would need to use if and else couchcms tags but not 100% sure
- Code: Select all
<div class="col-md-8 col-xs-12 col-sm-12">
<!-- Product Tabs-->
<div class="category-product">
<div class="navbar nav-menu">
<div class="navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a data-toggle="tab" href="#tab-1">New Arrivals</a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<div class="tab-container">
<!-- tab product -->
<div class="tab-panel active" id="tab-1">
<div class="category-products">
<ul class="products-grid">
<cms:pages masterpage='product.php' limit='3'>
<li class="item col-lg-4 col-md-4 col-sm-6 col-xs-6">
<div class="item-inner">
<div class="item-img">
<div class="item-img-info"><a class="product-image" href="<cms:show k_page_link/>"> <img class="img-responsive" alt="<cms:show product_name/>" src="<cms:show product_main_image/>"></a>
<div class="action"><a href="<cms:show k_page_link/>" title="View Product"><i class="fa fa-search"></i></a></div>
</div>
</div>
<div class="item-info">
<div class="info-inner">
<div class="item-title"><a href="<cms:show k_page_link/>"><cms:show product_name/></a></div>
<div class="item-content">
<div class="item-price">
<div class="price-box"><span class="regular-price"><span class="price"><cms:show product_price/></span></span></div>
</div>
</div>
</div>
</div>
</div>
</li>
</cms:pages>
</ul>
</div>
</div>
<!-- tab product -->
</div>
</div>
</div>
<div class="col-md-4 col-sm-12 jtv-features-top"> <!-- our features -->
<div class="our-features-box">
<cms:show_repeatable 'sideboxes'>
<cms:if k_count=='1'>
<div class="feature-box bg-green"> <i class="pe-7s-piggy"></i>
<div class="content">
<h3><cms:show box_heading/></h3>
<p><cms:show box_caption/></p>
</div>
</div>
<cms:else />
<cms:if k_count=='2'>
<div class="feature-box bg-pamaranch"> <i class="pe-7s-timer"></i>
<div class="content">
<h3><cms:show box_heading/></h3>
<p><cms:show box_caption/></p>
</div>
</div>
<cms:else />
<cms:if k_count=='3'>
<div class="feature-box bg-red"> <i class="pe-7s-headphones"></i>
<div class="content">
<h3><cms:show box_heading/></h3>
<p><cms:show box_caption/></p>
</div>
</div>
</cms:if>
</cms:if>
</cms:if>
</cms:show_repeatable>
</div>
</div>
I'm thinking if there is no content in the second div
- Code: Select all
<div class="col-md-4 col-sm-12 jtv-features-top">
- Code: Select all
<div class="col-md-12 col-xs-12 col-sm-12">
I thought I would need to use if and else couchcms tags but not 100% sure