2 Replies Latest reply on Dec 1, 2009 12:17 AM by pyae phyoe shein

    cfloop and horizontal repeating rows

    J_Tremain

      So I have this xml file that I'm looping thru and I have it displaying the results in a horizontal repeating row layout. One thing I'm not sure of is how to tell it to only repeat 5 items per row before starting a new row. Right now it's just displaying everything in one long row. Here's the code I have right now.

       

      <table width="180" border="0" cellspacing="0" cellpadding="0">

        <tr><cfloop from="1" to="#arrayLen(videos)#" index="i">

          <td align="center" valign="middle">

       

          <table width="180" border="0" cellpadding="0" cellspacing="0"> 

      <tr> 

        <td width="5%"><a href="http://blah.org/app/sites/#videos[i].websiteID#.aspx/websiteID=#videos[i].websiteID#&video ID=#videos[i].videoID#"><img src="#videos[i].thumbnailUrl#" width="80" height="80" border="0" /></a> 

        </td> 

        </tr>

      <tr>

        <td><a href="http://blah.org/app/sites/#videos[i].websiteID#.aspx/websiteID=#videos[i].websiteID#&video ID=#videos[i].videoID#" class="video-link">#videos[i].videoTitle#</a> <br />

          <span class="video-info">(#videos[i].videoDuration#)</span></td>

        </tr> 

      </table>

       

          </td></cfloop>

        </tr>

      </table>