Is it possible to call a cfm file from another cfm file with some URL parameters?
cfinclude does not works as it simply includes the content only..
When you use a <cfinclude>
, any values available in the page that calls the file are available in the page you will be including.
So you could essentially pass in variables instead of URL parameters and achieve the same thing. You would have to declare the variables above the include, however.
example.cfm
<cfset x = 5 />
<cfinclude template="derp.cfm" />
derp.cfm
<cfif IsDefined("x")>
<cfoutput>#x#</cfoutput> //this should output 5 since it was declared before the include
</cfif> //always good to make sure they're defined first