Data-Driven CSS Style Sheets Using ColdFusion

<!---
	Param the URL theme. This will determine the look and
	feel of our site by linked to a dynamic style sheet.
--->
<cfparam name="URL.theme" type="numeric" default="1" />
 
<cfoutput>
 
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html>
	<head>
		<title>Database Driven CSS Demo</title>
 
		<!-- Include the generic CSS. -->
		<link rel="stylesheet" type="text/css" href="generic.css"></link>
 
		<!--
			Include data-drive CSS. Notice that this LINK tag
			links to a ColdFusion file, not to a standard .CSS
			file. This is how we can generate it dynamically.
		-->
		<link
			rel="stylesheet"
			type="text/css"
			href="override.cfm?theme=#URL.theme#">
		</link>
	</head>
	<body>
 
		<h1>
			Database Driven CSS Demo
		</h1>
 
		<p>
			This is a demonstration to show how you can have a
			static style sheet that is then overridden, in part,
			by a database driven style sheet that exhibits
			different look-and-feel style properties.
		</p>
 
		<ul>
			<li>
				There is once generic style sheet which is static.
			</li>
			<li>
				Then, there is a style sheet that links to a
				<strong>ColdFusion file</strong> that generates
				the look-and-feel styles <em>dynamically</em>.
			</li>
		</ul>
 
		<p>
			Check out the different looks:
		</p>
 
		<ol>
			<li>
				<a href="./?theme=1">Theme One</a>
			</li>
			<li>
				<a href="./?theme=2">Theme Two</a>
			</li>
			<li>
				<a href="./?theme=3">Theme Three</a>
			</li>
		</ol>
 
	</body>
	</html>
 
</cfoutput>

For Cut-and-Paste