1 Reply Latest reply on Dec 19, 2007 5:44 PM by Dan Bracuk

    Only Display In Three Rows If Count Less Than 5

    ClayD Level 1
      I can't seem to figure this out, if my count in the initial if is less than 5 I only want there to be 1 row with three columns, I do not want the other 2 records to show up in another row.

      <cfif alsobought_counter LTE 9>
      <cfif (prodCount+(detailsColCount-1)) MOD detailsColCount EQ 0><div class="clearfix"></cfif>
      <div class="productThumbCont">
      <cfset product_link = link("product", alsoBought_product_id, product_title)>
      <div class="productThumbImg">
      <a href="#product_link#" class="picksLink" title="#linktitle#"><img src="#cfimage[alsobought_counter].thumb.path#" alt="" border="0" tooltip="#alsoBought_product_id#" /></a>
      </div>
      <div class="productThumbTitle">
      <a href="#product_link#" class="picksLink" title="#linktitle#">#product_title#<cfif len(trim(extendedTitle))> (#extendedTitle#)</cfif></a>
      <cfif len(trim(qryAlso_Bought.hotmovies_id)) AND qryAlso_Bought.is_disabled NEQ 1 AND request.allowVOD eq 1><div style="padding-top:5px;"><img src="../skins/graphics/btns/ondemand.gif" alt="Available On-Demand" border="0" /></div></cfif>
      </div>
      </div>
      <cfif prodCount MOD detailsColCount EQ 0></div></cfif>
      <cfset prodCount = IncrementValue(prodCount)>
      <cfset alsobought_counter = IncrementValue(alsobought_counter)>
      </cfif>