Hi Scott

We did exactly the same thing - the trick seemed to be that the style.cfm
page has to have a <CFCONTENT> tag in it, otherwise the browser just doesn't
get it. 

By the way, we found that it killed performance by an incredible amount, so
we switched to doing it by writing the stylesheet to a .css file (with
CFFILE) once the selections had been made, and just putting <link
rel="StyleSheet" TYPE="text/css" HREF="#CSSFilename#.css"> into subsequent
pages. This lowered CPU & DB load by almost a third - i'd HIGHLY recommend
you try it like this.

Cheers

Alistair Davidson
Senior Web Developer
Rocom New Media
www.rocomx.net



-----Original Message-----
From: Scott Weikert [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 18:27
To: CF-Talk
Subject: CF and custom stylesheets


Hey gang...

I've kinda got this working, but would prefer to improve it a bit. I'm
trying to modify an existing app, that uses stylesheets, to allow for
customization of the colorsets... so that User #1 can choose the "blue" set,
User #2 the "green" set, etc. Each set has a hex color code for each of the
styles used, stored in the DB... so basically, user logs in, tap the DB for
the colorcodes, make session vars out of each, reference said vars when
executing the style code, voila - purdy colors. :)

I can do this easily enough if I just include the style page (as a .cfm
file) - but what I'd *really* like to do is be able to link to the
stylesheet page, so that the styles themselves don't show up in the source,
i.e.

<LINK REL="StyleSheet" TYPE="text/css" HREF="style.cfm">

I've had some hassles trying to link the page like this... it doesn't seem
to properly execute the CF code within.

Anyone out there tried to do this same thing, and succeeded? Input would be
most welcome.

Thanks in advance-
--Scott
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to