GetBaseTagData
Description
Used within a custom tag. Finds calling (ancestor) tag by name and accesses its data.
Returns
An object that contains data (variables, scopes, and so on) from an ancestor tag. If there is no
ancestor by the specified name, or if the ancestor does not expose data (for example,
exception is thrown.
Category
Other functions
Function syntax
GetBaseTagData(tagname [, instancenumber ] )
See also
GetBaseTagList
Parameters
Parameter
tagname
instancenumber
Example
<!--- This example shows the use of GetBaseTagData
function. Typically used in custom tags.--->
...
<cfif trim(inCustomTag) neq "">
<cfoutput>
Running in the context of a custom
tag named #inCustomTag#.<p>
</cfoutput>
<!--- Get the tag instance data --->
<cfset tagData = GetBaseTagData(inCustomTag)>
<!--- Find the tag's execution mode --->
Located inside the
<cfif tagData.thisTag.executionMode neq 'inactive'>
template
<cfelse>
BODY
</cfif>
480
Chapter 3: ColdFusion Functions
Req/Opt Default
Required
Optional
1 (closest
ancestor)
Description
Ancestor tag name for which to return data
Number of ancestor levels to jump before returning data
), an
cfif