To get around this, you can use the CFMODULE tag (or a custom tag), which processes all data "outside" of the current template. Within the CFMODULE, you have access to the Caller and Attributes scopes; for former allows you to access variables in the calling template, whereas the latter allows you access to variables explicitly sent to CFMODULE:
<CFSET My_Variable1 = "123">
<CFMODULE TEMPLATE="foo.cfm" MY_VARIABLE2="bar">
...in foo.cfm, you have access to:
#Attributes.My_Variable1#
#Caller.My_Variable2#
You can also use CFCs -- check out more about CFMODULE, custom tags, and CFCs (ColdFusion components) in the LiveDocs.
HTH,
-Dain
Main Topics
Browse All Topics





by: pinaldavePosted on 2005-05-10 at 07:29:48ID: 13968738
CFC are something similar to cfinclude. devnet/mx/ coldfusion /cfcs.html
You can pass the params to that and receive the result back. Coldfusion component functions are object oriented methods of coldfusion.
http://www.macromedia.com/
Regards,
---Pinal