Thanks for the feedback. I'm reposting the code to give you a better
idea of what I have. And yes, I'm aware of the scoping and I'm just
using <cfoutput>#output#</cfoutput> on the calling template.
I look forward to hearing from your comments.
Cheers,
Mart�n
-----------------------------------------------------------------------
Hello folks,
I've been working on this one for too long and I thought of asking the
experts on the forum. I'm using CF 4.0.1.
Please see the code below. When I run the calling template I immediately
get an error saying: "Error resolving parameter OUTPUT..."
I'm calling the custom tag using the cfmodule tag. I used the debugger
and verified that the return variable (called "caller.output") gets set
within the custom tag.
When returning to the calling template caller.output is gone (and
therefore the error triggers). The variable type is a list but I don't
think it makes a difference as far as passing a variable back to the
calling template.
I really appreciate your suggestions and comments.
Cheers,
Martin
------------------------------------------------------------------------
Calling Template
------------------------------------------------------------------------
<cfloop query="QueryFromCFDirectoryTag">
<!-- Check whether each directory contains some value -->
<cfif "value found">
<cfmodule template="customtag" file="filename" return="output">
<cfoutput>#output#</cfoutput>
</cfif>
</cfloop>
------------------------------------------------------------------------
Custom Tag
------------------------------------------------------------------------
<cfparam name="file" default="#attributes.file#">
<cfparam name="attributes.return" default="return">
<cfloop through a list>
<!-- Check for a certain value in the element to finish looping -->
<cfif found>
<cfset dummy = setVariable("caller." & attributes.return, #listname#)>
<cfexit method="EXITTAG">
</cfif>
</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists