I would like to insert a clearfix div after every third category listing. I have used this method successfully when outputting from {exp:channel:entries}
tag pairs, but it appears that the {switch}
variable is not available for {exp:channel:categories}
tag pairs.
Is there another way to accomplish this (perhaps with CSS, jQuery, or another EE function I'm unaware of)?
{exp:channel:categories channel="Projects" style="linear" show_empty="no" dynamic="no" disable="member_data|pagination"}
<div class="column one-third">
<div class="pic">
<a href="{path='our-work/list'}">
{if category_image}{exp:ce_img:single src="{category_image}" crop="yes" width="420" height="290" filter="auto_sharpen"}
{if:else}<img src="{lv_shortcuts_project_image_none}" alt=""/>{/if}
<div class="img_overlay"></div></a>
</div>
<h3><a href="{path='our-work/list'}">{category_name}</a></h3>
<p>{category_description}</p>
</div>
{switch='||<div class="clearfix"></div>'} <!-- DOES NOT WORK -->
{/exp:channel:categories}
Thanks!
{if count == "3" OR count == "6"}<div class="clearfix"></div>{/if}
for now. It is unlikely they will ever have more than 8 categories. Do you want to post your idea as an answer so I can give you credit?