To call the tempate which displays the code, put this code into any file you want to 
view:

view_source.cfm?file=#script_name#

To display the code (from a file named view_source.cfm linked as the above):

<cffile action="READ" file="#documentdirectory##file#" variable="contents">

<cfoutput>
<form>
<textarea cols=80 rows=25>
#contents#
</textarea>
</form>

</cfoutput>

--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net 
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------


> -----Original Message-----
> From: John Allred [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 09, 2000 7: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 &amp;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?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to