home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / cfmodule.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  928 b   |  41 lines

  1. <!--- This view-only example shows the use of CFMODULE --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>CFMODULE Example</TITLE>
  5. </HEAD>
  6.  
  7. <BODY>
  8. <H3>CFMODULE Example</H3>
  9.  
  10. <P>This example shows the use of CFMODULE to call a sample custom 
  11. tag inline.
  12. <P>To activate this example, you will need to save the sample
  13. custom tag into a CustomTags/SampleTag directory under ColdFusion.
  14. <!---
  15. <!--- sample custom tag (save this in the cfusion\CustomTags directory --->
  16. <!--- as myTag.cfm. This tag takes two parameters, adds them and
  17. returns the result --->
  18. <CFSET X = attributes.x>
  19. <CFSET Y = attributes.y>
  20. <CFSET caller.result = x + y>
  21. <!--- end sample tag --->
  22.  
  23. <!--- Call the tag with CFMODULE--->
  24. <CFMODULE
  25.     NAME="myTag"
  26.     X=3
  27.     Y=4>
  28.  
  29. <!--- show the code --->
  30. <CFOUTPUT>#HTMLCodeFormat("    <CFMODULE
  31.     NAME='myTag'
  32.     X=3
  33.     Y=4>")#
  34. </CFOUTPUT>    
  35. <P>The result: <CFOUTPUT>#result#</CFOUTPUT>    
  36.  
  37. --->
  38.  
  39. </BODY>
  40. </HTML>       
  41.