ColdBox Variable
handlers/home.cfc
<cffunction name="index" output="false" hint="index">
<cfargument name="event">
<cfset rc.Test = 'This is a test 123.' />
<cfset event.setView("home/index")>
</cffunction>
views/home/index.cfm
<cfdump var="#rc#" />
Why is rc.test not showing up in the dump?
Without
rc
defined withcfargument
, yourrc.test
will be set tovariables.rc.test
in your handler.Do this: