This works, but why not use Dave's approach and pass the query as a pointer. It will make more readable code. Also, you don't need to pass the recordcount into the CT. The info is available there.
Calling the tag with this: <cf_theS Rows="3" Query="#GetProductList#"> <!--- begin custom tag---> <cfset numberOfRows = ceiling(attributes.Query.RecordCount/attributes.Rows)> <cfset NumOfCol = attributes.Rows> <cfset BeginRow = "1"> <table width="100" cellpadding="5"> <cfloop index="i" from="1" to="#numberOfRows#"> <tr> <cfoutput query="ATTRIBUTES.Query" StartRow="#variables.BeginRow#" Maxrows="#variables.NumOfCol#"> <td> <img src="../catImages/#ThumbNail#" border="0" alt="#ID#"> </td> </cfoutput> <cfset BeginRow = BeginRow + NumOfCol> </tr> </cfloop> </table> -----Original Message----- From: Chad Gray [mailto:[EMAIL PROTECTED]] Sent: donderdag 11 april 2002 22:45 To: CF-Talk Subject: RE: Custom Tag Question Ok... i did quite follow what you guys were saying, but thanks for trying. I did get it to work like this. Let me know if im an idiot and if this is total kludge. I put Caller.#ATTRIBUTES.Query# into the Query="" on my CFoutput. Calling the tag with this: <cf_theS QueryCount=#GetProductlist.recordcount# Rows="3" Query="GetProductList"> <!--- begin custom tag---> <cfset numberOfRows = ceiling(attributes.QueryCount/attributes.Rows)> <cfset NumOfCol = attributes.Rows> <cfset BeginRow = "1"> <table width="100" cellpadding="5"> <cfloop index="i" from="1" to="#numberOfRows#"> <tr> <cfoutput query="Caller.#ATTRIBUTES.Query#" StartRow="#variables.BeginRow#" Maxrows="#variables.NumOfCol#"> <td> <img src="../catImages/#ThumbNail#" border="0" alt="#ID#"> </td> </cfoutput> <cfset BeginRow = BeginRow + NumOfCol> </tr> </cfloop> </table> ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists