ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Closing Row variable

September 30, 2012 8:06am

Subscribe [2]
  • #1 / Sep 30, 2012 8:06am

    Kaspar

    30 posts

    Hi I work with the foundation framework.

    I try to create a Entry structure with 3 columns but I want it to by dynamic. So if there is only 1 or two columns the parent div should still receive a closing tag.

    My brain already melted a little.

    So I have a Row with three columns. Each column is a EE entry.
    Sometimes there are only one columns and sometimes there are two columns.
    Now I’d like EE to determine the amount of columns and append the closing Row tag intelligently.

    If I have always three columns. Its easy:

    {exp:channel:entries channel="teammitglied" disable="member_data|pagination" category="3"}
     {switch="<div class='row team'>||"}
      <div class="four columns">
       {title}
       {text_teammitglied}
      </div> 
     {switch="||</div>"}
    {/exp:channel:entries}

    EE ads the closing row tag after the third columns div.

    But if there are e.g. five entries the second row isn’t being closed because the div in the switch tag doesn’t kick in.

    Is it possible to ad a variable like this: “If there is only one columns ad the ending div after the first time. If there are two columns ad the ending div after the second time”

    That would be awesome.

  • #2 / Oct 01, 2012 4:35pm

    Dan Decker

    7338 posts

    Hi Kaspar,

    You need to check out Column-bo. It is made to make this idea easy and it’s free!

    Cheers,

  • #3 / Oct 02, 2012 6:21am

    Kaspar

    30 posts

    Great addon.

    Thanks for the hint 😊

  • #4 / Oct 03, 2012 1:37pm

    Shane Eckert

    7174 posts

    Hey there Kaspar,

    I am glad to see that Dan was able to help!

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases