MajinOLesedi
05-10-2012, 02:43 PM
How can I make 3x1 columns for my section news feed (Sample pic below). I realized there are only 6 default columns. With '1x3 column' being the closest to what I want, I tried to reverse and modify its vbcms_content_section_type6 template but with no luck.
I've been experimenting with the code below but it just duplicates articles.
<vb:if condition="$result_count > 1">
<vb:each from="contents" key="id" value="content">
<vb:if condition="$id > 0">
<vb:if condition="($id % 3) == 1">
<div style="width:640px;height:230px;">
<div style="float: left; width: 203px; height: 190px; padding-right: 10px" <vb:if condition="$id > 3"> cms_separator</vb:if>">
{vb:raw content}
</div>
<vb:else />
<vb:if condition="($id % 3) == 2">
<div style="float: left; width: 203px; height: 190px; padding-right: 10px"<vb:if condition="$id > 3"> cms_separator</vb:if>">
{vb:raw content}
</div>
</vb:if>
<vb:if condition="($id % 3) == 0">
<div style="float: left; width: 203px; height: 190px; padding-right: 10px"<vb:if condition="$id > 3"> cms_separator</vb:if>">
{vb:raw content}
</div>
</div>
<div class="greyline_seperator_div"></div>
</vb:if>
</vb:if>
</vb:if>
</vb:each>
<vb:if condition="($result_count % 3) != 1">
</div>
</vb:if>
</vb:if>
<vb:if condition="$result_count > 1">
<vb:each from="contents" key="id" value="content">
<vb:if condition="$id > 3">
<div class="fullwidth cms_separator">
{vb:raw content}
</div>
</vb:if>
</vb:each>
</vb:if>
I've been experimenting with the code below but it just duplicates articles.
<vb:if condition="$result_count > 1">
<vb:each from="contents" key="id" value="content">
<vb:if condition="$id > 0">
<vb:if condition="($id % 3) == 1">
<div style="width:640px;height:230px;">
<div style="float: left; width: 203px; height: 190px; padding-right: 10px" <vb:if condition="$id > 3"> cms_separator</vb:if>">
{vb:raw content}
</div>
<vb:else />
<vb:if condition="($id % 3) == 2">
<div style="float: left; width: 203px; height: 190px; padding-right: 10px"<vb:if condition="$id > 3"> cms_separator</vb:if>">
{vb:raw content}
</div>
</vb:if>
<vb:if condition="($id % 3) == 0">
<div style="float: left; width: 203px; height: 190px; padding-right: 10px"<vb:if condition="$id > 3"> cms_separator</vb:if>">
{vb:raw content}
</div>
</div>
<div class="greyline_seperator_div"></div>
</vb:if>
</vb:if>
</vb:if>
</vb:each>
<vb:if condition="($result_count % 3) != 1">
</div>
</vb:if>
</vb:if>
<vb:if condition="$result_count > 1">
<vb:each from="contents" key="id" value="content">
<vb:if condition="$id > 3">
<div class="fullwidth cms_separator">
{vb:raw content}
</div>
</vb:if>
</vb:each>
</vb:if>