Wrapping LV matrix entries in rows
Hello Lodewijk,
I am trying to wrap three LV matrix entries in a row.
My code is as follows
{exp:low_variables:parse var="var_1"}
{if var_1:count == 1}
<div class="row mb25">
{/if}
<!-- The column data goes here -->
{if var_1:count % 3 == 0 AND var_1:count != var_1:total_results}
</div><!-- /row -->
<div class="row mb25">
{/if}
{if var_1:count == var_1:total_results}
</div>
{/if}
{/exp:low_variables:parse}
The opening div doesn't show!
Am I doing something wrong?
Replies
Noor Mohammad 4 Apr 2016 20:04
{exp:low_variables:parse var="var_members"}
{switch="
<div class='row mb25'>
<div class="span3">
<div class="project-box">
<img src="{image:tn}" alt="">
<i class="icon-caret-right"></i>
<h4><a href="{path='site/member_details'}">{name}</a></h4>
<p>{title}</p>
</div><!-- /project-box -->
</div><!-- /span3 -->
|
<div class="span3">
<div class="project-box">
<img src="{image:tn}" alt="">
<i class="icon-caret-right"></i>
<h4><a href="{path='site/member_details'}">{name}</a></h4>
<p>{title}</p>
</div><!-- /project-box -->
</div><!-- /span3 -->
|
<div class="span3">
<div class="project-box">
<img src="{image:tn}" alt="">
<i class="icon-caret-right"></i>
<h4><a href="{path='site/member_details'}">{name}</a></h4>
<p>{title}</p>
</div><!-- /project-box -->
</div><!-- /span3 -->
</div>
"}
{/exp:low_variables:parse}
This worked
Low 6 Apr 2016 20:03
Try using the var_prefix parameter in the Parse tag: https://docs.pixelandtonic.com/matrix...