GetBaseTagData

Description

Used within a custom tag. Finds calling (ancestor) tag by name and accesses its data.

Return value

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, cfif), an exception is thrown.

Category

Other functions

Syntax

GetBaseTagData(tagname [, instancenumber ] )

See also

GetBaseTagList

Parameters

Parameter Req/Opt Default Description
tagname
Required

Ancestor tag name for which to return data
instancenumber
Optional
1 (closest ancestor)
Number of ancestor levels to jump before returning data

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>

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6

Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/functions-pt187.htm