I'm trying to use <cfmodule> to do some HTML layout from within a CFC.

Here's the code inside the CFC:

-----------

<cffunction name....>

<cfmodule template="/templates/template_main.cfm">

<cfoutput>
Some generated output from the function.
</cfoutput>

</cfmodule>

</cffunction>

------------


This is some example code from template_main.cfm:

------------

<cfsetting enablecfoutputonly="yes">

<cfif thisTag.executionMode is "start">
<cfoutput>
        <html>
</cfoutput>
</cfelse>
<cfoutput>
        </html>
</cfoutput>
</cfif>
<cfsetting enablecfoutputonly="no">

-------------


What I would expect would be HTML that looks like:
<html>
Some generated output from the function.
</html>

But instead I receive a ColdFusion error, "Context validation error
for tag cfif."   The error occurred in
C:\CFusionMX\wwwroot\templates\template_main.cfm: line 2
1 :
2 : <cfif thisTag.executionMode is "start">
3 : <cfoutput>


I know I must be mis-using the cfmodule, but I'm pretty stuck on what
I'm doing wrong. Any ideas would be greatly appreciated!

Thanks,
Chris

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233653
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to