the grouping cfoutput.
Ade
-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: 29 March 2005 05:08
To: CF-Talk
Subject: Re: Alternating Row Colour - Sorta
RE: http://www.stpaulscolumbia.com/calendar_test.cfm
Still not working - but - I don't see anything in the below
This should work, if I understand the result correctly (alternate
color by day, not by row).
!--- Fake Query ---
cfset qEvents = queryNew(label,event_date) /
cfset queryAddRow(qEvents, 11) /
cfset querySetCell(qEvents, label, Mon - event 1, 1) /
cfset querySetCell(qEvents, label, Mon - event 2,
Try this:
cfset color=1
cfoutput query=calendar group=theMONTH
h4#LSDateFormat(calendar.event_date,' - ')#/h4
div id=eventBODY
cfoutput group=event_date
div class=event#listGetAt('WHITE,YELLOW', color)# - Lots of stuff
here - /div
cfset color=3-1
/cfoutput
Here's the page in question:
http://www.stpaulscolumbia.com/calendar.cfm
Client is asking for alternating colors for DAYS - not rows.
At first, I figured, OK, Odd Dates one colour, Even Dates another.
Nope, don't work because there may be something on the 5th and 7th, both
odd dates - but not
: Alternating Row Colour - Sorta
Here's the page in question:
http://www.stpaulscolumbia.com/calendar.cfm
Client is asking for alternating colors for DAYS - not rows.
At first, I figured, OK, Odd Dates one colour, Even Dates another.
Nope, don't work because there may be something on the 5th
:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 4:44 PM
To: CF-Talk
Subject: Alternating Row Colour - Sorta
Here's the page in question:
http://www.stpaulscolumbia.com/calendar.cfm
Client is asking for alternating colors for DAYS - not rows.
At first, I figured, OK, Odd Dates one colour, Even Dates
,de(DD),de(FF))
/cfif
OUTPUT ROWS using #currentBG#
/CFLOOP/CFQUERY
-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: Monday, March 28, 2005 4:44 PM
To: CF-Talk
Subject: Alternating Row Colour - Sorta
Here's the page in question:
http://www.stpaulscolumbia.com
/cfloop
- Original Message -
From: Les Mizzell [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Monday, March 28, 2005 2:44 PM
Subject: Alternating Row Colour - Sorta
Here's the page in question:
http://www.stpaulscolumbia.com/calendar.cfm
Client is asking
cfoutput query=query
cfif query.CurrentRow MOD 2
one colour
cfelse
another colour
/cfif
/cfoutput
Nope, that's not it.
Let's say the Calendar is showing a number of events:
Mon - event 1
Mon - event 2
Mon - event 3
Tue - event 1
Tue - event
Subject: Re: Alternating Row Colour - Sorta
cfoutput query=query
cfif query.CurrentRow MOD 2
one colour
cfelse
another colour
/cfif
/cfoutput
Nope, that's not it.
Let's say the Calendar is showing a number of events:
Mon - event 1
Mon
Adrian Lynch wrote:
How about looking back at the previous day to see if it's changed.
cfif CurrentRow NEQ 1 AND Day(query[date][CurrentRow]) NEQ
Day(query[date][CurrentRow - 1])
Change colour
/cfif
That's close, but not quite.
Test Page here:
Here's the whole code block for reference. It displays three months of
events at a time:
QUERY:
cfquery name=calendar
SELECT
id, event_date, month(event_date) as theMONTH, event_name, event_pic
FROM stpaul_events
WHERE month(event_date) = #month(now())#
and month(event_date) #threemonths#
Would you be able to post the output code?
-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: 29 March 2005 00:49
To: CF-Talk
Subject: Re: Alternating Row Colour - Sorta
Adrian Lynch wrote:
How about looking back at the previous day to see if it's changed.
cfif
=#myCSS# - Lots of stuff here - /div
cfset counter = 1
/cfoutput
/div
/cfoutput
-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: 29 March 2005 00:57
To: CF-Talk
Subject: Re: Alternating Row Colour - Sorta
Here's the whole
=#myCSS# - Lots of stuff here - /div
cfset counter = 1
/cfoutput
/div
/cfoutput
-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: 29 March 2005 00:57
To: CF-Talk
Subject: Re: Alternating Row Colour - Sorta
-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: 29 March 2005 00:57
To: CF-Talk
Subject: Re: Alternating Row Colour - Sorta
Here's the whole code block for reference. It displays three months of
events at a time:
QUERY:
cfquery name=calendar
SELECT
id, event_date
Douglas Knudsen wrote:
you want all days with event 1 say blue, then all days with event 2
green, etc...??? If so, build a structure daColours with keys as the
event ids.
daColours[eventid1]
daColours[eventid2]
daColours[eventid3]
Then use something like the below
span
Try this:
!--- Set the CSS array ---
cfset myCss = arrayNew(1) /
cfset myCSS[1] = eventWhite /
cfset myCSS[2] = eventYellow /
cfset switch = 1 /
!--- Get the data ---
cfquery name=calendar
SELECT
id, event_date, month(event_date) as theMONTH, event_name, event_pic
FROM stpaul_events
WHERE
18 matches
Mail list logo