This is not really a tutorial but a helper file for people trying to solve programming issues with a friends help. By using this code snippet in your templates you can send the template url to a friend than they can easily see your entire code and perhaps help you solve that one little glitch that is escaping you. This is much easier than having to post a lengthy template or for that matter email a long template to your friends. I use this myself and have made it a practice after reading Eric Meyer's tutorial on Automatically adding comments to a CF template. The link I use is placed in the bottom of the template right before the closing body tag.


<!--- Put on top of your Template --->
<cfif IsDefined("url.show")>
     <cffile action="READ" file="#PATH_TRANSLATED#" variable="thisfile">
     <cfoutput>
<html><body><pre>#htmleditformat(thisfile)#</pre></body></html></cfoutput>
     <cfabort>
</cfif>





<!--- Put This Link Before final closing body tag --->

<cfoutput><center><a href="#GetFileFromPath(PATH_TRANSLATED)#?show=yes">Show Source</a></center></cfoutput>

About This Tutorial
Author: Redmanz
Skill Level: Beginner 
 
 
 
Platforms Tested: CF4,CF5
Total Views: 35,947
Submission Date: February 18, 2003
Last Update Date: June 05, 2009
All Tutorials By This Autor: 6
Discuss This Tutorial
  • I'm only know learning ColdFusion so I'm sure this will be of an enormous help to me.

Advertisement

Sponsored By...
Powered By...