Not sure if you can reference a CSS style sheet if it actually stored as
.cfm template but try this (I'm moving a site from one server to a new one
at the moment so am pre-occupied).
In your application.cfm template do this:
<cfif not isdefined("Request.ApplicationMode")>
<cfparam name="Request.ApplicationMode" default="Development"
type="string">
</cfif>
In your "stylesheet.cfm" try this:
<cfswitch expression="#Request.ApplicationMode#">
<cfcase value="Development">
BODY {
height : 8.5in;
color : #000072;
background-color : #ccFFcc;
}
</cfcase>
<cfcase value="Production">
BODY {
height : 8.5in;
color : #000072;
background-color : #000000;
}
</cfcase>
<cfdefaultcase>
BODY {
height : 8.5in;
color : #000072;
background-color : #ccFFcc;
}
</cfdefaultcase>
</cfswitch>
I haven't tested this code but it seems feasible. I turned an XML template
into a CFM template for the flash driven menu at http://www.actcfug.com so
as long as the XML remains valid it works despite being "dynamic".
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Andrew
Dickinson
Sent: Wednesday, 1 October 2003 11:29 AM
To: CFAussie Mailing List
Subject: [cfaussie] RE: How to set default background colour ?
Nope, didn't work.
But I figured it out. I added a line to the BODy section of the
stylesheet, like so ........
BODY {
height : 8.5in;
color : #000072;
background-color : #ccFFcc;
}
Thanks anyway.
> create a variable in application.cfm
>
> <cfset bg_default = "abcdef" >
>
> In the body tag of the pages set
>
> <body bgcolour = #bg_default#>
>
> If you are using tag for menu and navigation, the job is simpler.
> just do it in that page alone.
>
> --Balaji
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Andrew
> Dickinson
> Sent: Wednesday, October 01, 2003 10:12 AM
> To: CFAussie Mailing List
> Subject: [cfaussie] How to set default background colour ?
>
>
> We run an offline version of our system here (for testing and development,
> of course).
>
> I maintain a light green background on the offline system, in order to
> make it instantly clear exactly what code I'm modifying.
>
> I copied the entire live system to offline last week, and I now can't
> remember how to set the default background colour. Can someone please
> remind me ?
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/