Here's the logic, you can write the code...
If switch=execute
cfinclude the file
if switch=viewsource
cffile the file
output the contents of the file
set the content type of the file to text/plain
<cfheader name="Content-Type" value="text/plain">
______________________________________________
Pete Freitag ([EMAIL PROTECTED])
CFDEV.COM / NETDesign Inc.
ColdFusion Developer Resources
http://www.cfdev.com/
-----Original Message-----
From: John Allred [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 10:10 AM
To: CF-Talk
Subject: Displaying CF code
I have some CF templates on an intranet for which I'd like to display the
code in the user's browser. I find myself without my printed manuals, and I
can't seem to find what I'm looking for in the online help.
Can someone recommend a method I can use to include and transform the code
from a CF template in another template and have it display but not execute?
I fear I'm not making this very clear. What I want to do is have my main
template, that is including a file based on a CFSWITCH on a variable,
either include a file and execute it or pull that same file in and display
the code only by replacing the left brackets with &lt; .
TIA,
--John
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.