I am using cfmodule with a template and I'm hoping to access the default values of the module, even if other values are passed in. Is that possible in some way? Outputting the attributes scope just has the entire data passed in with no indication of the value.
Example.
<cfmodule fielda="#data#" template="myTemplate.cfm" />
myTemplate.cfm
<cfparam name="attributes.data" default="1" />
Assuming data has a value of 2. Is it possible from within myTemplate.cfm to know the default value was 1?
Not really possible. All that the template can do is include a bunch of HTML into your template.
But the solution is simple: Use a .cfc instead. Instead of <cfmodule>
ing a template, call a function that outputs HTML. Unless it is sent a parameter "mode=diagnostic" or some such, in which case it doesn't output anything, but instead it returns a struct.
So you can call the function in diagnostic mode, read the struct, or call it in default mode and output stuff.
Makes sense?