I've got a problem I've never run into before with nested custom tags. I'm
using nested paired tags:
<cf_parent>
<cf_child>
...some text here
</cf_child>
<cf_child>
...more text
</cf_child>
</cf_parent>
When I dump #ThisTag# all the AssocAttribs are doubled. I belive I'm taking
steps to prevent this but here is some code to look over:
parent.cfm
==============
<cfset ThisTag.GeneratedContent = "">
<cfswitch expression="#ThisTag.ExecutionMode#">
<cfcase value="Start">
<cfif NOT ThisTag.HasEndTag>
<cfabort showerror="This tag requires a closing tag">
</cfif>
</cfcase>
<cfcase value="End">
<cfdump var="#ThisTag#">
</cfcase>
</cfswitch>
===========
child.cfm
===========
<cfparam name="Attributes.childData" default="">
<cfassociate baseTag="cf_parent">
<cfset LocalContent = ThisTag.GeneratedContent>
<cfset ThisTag.GeneratedContent = "">
<cfswitch expression="#ThisTag.ExecutionMode#">
<cfcase value="Start">
<cfif NOT ThisTag.HasEndTag>
<cfabort showerror="This tag requires a closing tag">
</cfif>
</cfcase>
<cfcase value="End">
<!--- TAKE TEXT BETWEEN THE TAGS AND PUT IT INTO A DIV STORED AS AN ATTRIBUTE
VARIABLE --->
<cfsavecontent variable="Attributes.childData">
<div>
<cfoutput>
#LocalContent#
</cfoutput>
</div>
</cfsavecontent>
</cfcase>
</cfswitch>
================
Any ideas why I'm getting the duplication.
Thanks,
ColdFused
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316673
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4