0

I have a list of dynamic entries I want to split evenly between two columns. Is there a way to do this?

1

Use jQuery. Something like this maybe: http://johndoesdesign.com/blog/2012/jquery/how-to-split-a-dynamic-list-into-two-equal-columns-using-jquery/

2

You could try using Splitter, I've used it before for tis purpose.

1
  • +1 for Splitter. Works as advertised, no muss no fuss. – dashard Jul 24 '14 at 3:54
1

If they have to be in absolutely two columns, you can make two channel entries calls and use the expressionengine modulus (%) operator

<section class="column1">
{exp:channel:entries channel="foo"}
    {if count % 2 == 0}
        {title}
    {/if}
{/exp:channel:entries}
</section>
<section class="column2">
{exp:channel:entries channel="foo"}
    {if count % 2 == 1}
        {title}
    {/if}
{/exp:channel:entries}
</section>

But that means that you are doubling your queries. I would suggest trying an alternate html/css layout that allows you to make a single channel entries call.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.