Tips tagged “Count”
- Multi Column Entry Lists
-
Posted on June 08, 2009 by Hambo
If you have a fixed number of entries and you want to split them over a few columns, this is easy with conditionals and the count variable.
{exp:weblog:entries weblog="stuff"}
{if count == 1 OR count == 4 OR count == 7}
<ul class="column">
{/if}
<li>{title}</li>
{if count == 3 OR count == 6 OR count - Custom counter for loops that don’t support {count}
-
Posted on June 01, 2009 by JonnyUK
Every now and then you might come across a situation where you want to count within a loop but unfortunately the {count} variable is not available.
This is a common problem when dealing with related entries because they are cached internally causing various dynamic statistical variables such as
