I'm not a huge fan of mixing that sort of logic into your presentation. Sure
I've done it plenty of times before but increasingly I'm spending the effort
to get the data right before I start outputting.

In your case this would look something like:

<cfset queryAddColumn(q,'class',arrayNew(1))>
<cfloop query="q">
        <cfif q.currentRowMOD 2>
                <cfset querySetCell(q,'class','lightRowCol',q.currentRow)>
        <cfelse>
                <cfset querySetCell(q,'class','darkRowCol',q.currentRow)>
        </cfif>
</cfloop>

Then you don't need if's in your output.

Inefficient? Anal? Maybe, but I just find things easier to work with in the
long run when you start breaking it up this way.


Cheers

Mark


------------------
Mark Stanton
Technical Director
Gruden Pty Ltd
Tel: 9956 6388
Mob: 0410 458 201
Fax: 9956 8433
http://www.gruden.com


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to