> A bit OT, but I was wondering if anyone knew how to
> use cfmodule on a custom tag that has an opening and
> closing tag, ala cf_bodycontent.
>
> This does not work:
>
> <cfmodule template="bodycontent.cfm">
> blah blah blah
> </cfmodule>
>
> Has anyone figured this out? Willing to share the
> syntax? TIA,
Yes you can use CFMODULE that way. BUT if you wan't to nest them then you
HAVE to use ending CFMODULE tag even if it's not needed by the file, like
this: <cfmodule ...></cfmodule>
Anyway, try these example files below (index.cfm, 1.cfm, 2.cfm). Says all
you need I think.
Erki
<!--- // index.cfm \\ --->
i'm in index.cfm<br>
<cfmodule template="1.cfm">
i started 1st module, i'll now start 2nd module<br>
<cfmodule template="2.cfm">
i'm inside the 2nd module<br>
</cfmodule>
i'm in 1st module again<br>
</cfmodule>
i'm outside the module again.
<!--- \\ index.cfm // --->
<!--- // 1.cfm \\ --->
<cfif ThisTag.ExecutionMode EQ "start">
1st module started<br>
<cfelse>
1st module ended<br>
</cfif>
<!--- \\ 1.cfm // --->
<!--- // 2.cfm \\ --->
<cfif ThisTag.ExecutionMode EQ "start">
2nd module started<br>
<cfelse>
2nd module ended<br>
</cfif>
<!--- \\ 2.cfm // --->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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