I'm getting an error "transaction_types" is undefined, and having trouble understanding why.
I have application.cfc:
<cffunction name="onRequest" >
<cfargument name="targetPage" type="String" required=true/>
<cfinclude template="header.cfm">
</cffunction>
header.cfm file looks like this (header is called on every file and there is a different subheader depending on the directory the user is in):
<cfinclude template="#GetDirectoryFromPath(Arguments.targetPage)#subheader.cfm" />
The directory I'm having a problem with has two files, index.cfm and subheader.cfm
subheader.cfm, the first line
<cfset transaction_types = ["a", "b", "c"] />
part of index.cfm, and I think the issue might be the cflocation, but I'm not sure:
<cfif structKeyExists(url, "something") >
-- some database work is done here --
<cflocation url="index.cfm">
</cfif>
--further down on this page, transaction_types is used
I set the page up thinking transaction_types will be defined any time directory/index.cfm loads, since the application file always loads header.cfm and subsequently directory/subheader.cfm before directory/index.cfm. Does cflocation bypass this?