home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / getcurrenttemplatepath.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  1023 b   |  33 lines

  1. <!--- This example uses GetCurrentTemplatePath to show
  2. the template path of the current page --->
  3. <HTML>
  4. <HEAD>
  5. <TITLE>GetCurrentTemplatePath Example</TITLE>
  6. </HEAD>
  7.  
  8. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  9. <BODY  bgcolor="#FFFFD5">
  10.  
  11. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  12. <BODY  bgcolor="#FFFFD5">
  13. <H3>GetCurrentTemplatePath Example</H3>
  14.  
  15. <CFOUTPUT>
  16. <P>GetBaseTemplatePath returns the template path of the current page:<BR>
  17. #GetBaseTemplatePath()#</P>
  18. </CFOUTPUT>
  19.  
  20. <CFOUTPUT>
  21. <P>GetCurrentTemplatePath returns the template path of the page from which it is called:<BR>#GetCurrentTemplatePath()#
  22. </CFOUTPUT>
  23.  
  24. <P>The difference between the two functions is that GetCurrentTemplatePath returns the name of
  25. the template from which it is called, even when it is called from an included file.</P>
  26.  
  27. <P>The next line of code includes the template getbasetemplatepath.cfm.</P>
  28. <CFINCLUDE template="getbasetemplatepath.cfm">
  29. <CFINCLUDE template="getbasetemplatepath.cfm">
  30.  
  31. </BODY>
  32. </HTML>
  33.