Question
Need Help Displaying Query
I am having problems with this, I need to re-write this into
3 different routes the CFIF can take. Currently this works because
the query only returns 9 records, they are being displayed as 3
rows with 3 columns. I need to re-write and have it where if the
record count is LT9 to only have the output be on 2 columns with 3
rows....and if the count is LT6 then i only want 1 row with 3
columns. I am having problems figuring out how to modify this code
to accomplish this task. Any help would be greeeeeeeeeeeeat.
<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#" />
<cfif len(trim(qryAlso_Bought.is_ondemand)) and qryrelated_products.is_ondemand EQ 1 AND qryAlso_Bought.is_disabled
NEQ 1 AND request.allowVOD eq 1><div class="on-demand-call-out"
style="cursor:pointer;margin-top:-22px;margin-top:-25/**/px;margin-left:21px;background:
url(../skins/graphics/btns/ondemand-overlay.gif) 0 0
no-repeat;width:79px;height:22px;filter:alpha(opacity=80);-moz-opacity:.80;opacity:.80;"></div></cfif></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>
</cfoutput>
<cfif (prodCount-1) MOD detailsColCount NEQ 0></div></cfif>
</div> Text
<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#" />
<cfif len(trim(qryAlso_Bought.is_ondemand)) and qryrelated_products.is_ondemand EQ 1 AND qryAlso_Bought.is_disabled
NEQ 1 AND request.allowVOD eq 1><div class="on-demand-call-out"
style="cursor:pointer;margin-top:-22px;margin-top:-25/**/px;margin-left:21px;background:
url(../skins/graphics/btns/ondemand-overlay.gif) 0 0
no-repeat;width:79px;height:22px;filter:alpha(opacity=80);-moz-opacity:.80;opacity:.80;"></div></cfif></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>
</cfoutput>
<cfif (prodCount-1) MOD detailsColCount NEQ 0></div></cfif>
</div> Text