> > How do you get the child tag to access the attributes of the
> > parent?
> >
> > <cf_MyParentTag Attrib1="test1" Attrib2="test2">
> > <cf_MyChildTag ShowAttrib="Attrib1">
> > </cf_MyParentTag>
>
> Also how do you pass data from the parent tag to the child
> tag without using the request scope? For instance if I set
> a variable called X in the parent how do I out put it in the
> child
You've got lots of options for this, depending on how you create the
variable in the parent tag. If you set a local variable within the parent
tag, you can reference it from within the child tag using the GetBaseTagData
function:
<!--- cf_MyParentTag --->
<cfset Variables.X = "42">
<!--- end cf_MyParentTag --->
<!--- cf_MyChildTag --->
<cfset stBaseData = GetBaseTagData("cf_MyParentTag")>
<cfset ParentX = stBaseData.Variables.X>
<cfoutput>#ParentX#</cfoutput>
<!--- end cf_MyChildTag --->
Alternatively, there are all kinds of scopes available to both the parent
and child tags: Request, Caller (which for both parent and child tags will
resolve to the calling page's local Variables scope), Application, Session
and Server.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]