If you use custom tags called via CFMODULE or <CF_PAGENAME etc. they have their own variables scope!
so
Application.cfm
<cfinclude template=" udf.cfm" >
index.cfm
<cfmodule template="mytag.cfm">
mytag.cfm
<cfoutput>#tr("test")#</cfoutput>
wont work since the cfmodule creates a unquie variables scope. The solution is to use either
1. Request Scope
2. Application Scope
or
3. a CFC instance / struct or function reference itself that you pass as an attribute to the tag.
hth
Pat
On 6/27/06, Dale Fraser <[EMAIL PROTECTED]> wrote:
How do you include a function to be available on every page.
We have a translate function that needs to be available every page, and cant get this to work without putting the <CFINCLUDE on every page.
I thought we could have just put the function in application.cfm
And it would have been available, but this doesn't work.
Regards
Dale Fraser
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---
