GetBaseTagList

Returns a comma-delimited list of uppercase ancestor tag names. The first element of the list is the parent tag. If you call this function for a top-level tag, it returns an empty string.

See also GetBaseTagData.

Syntax

GetBaseTagList()

Example

<!--- This example illustrates usage of the GetBaseTagList
      function. This is typically used in custom tags. --->
...
<CFIF thisTag.executionMode is "start">

    <!--- Get the tag context stack 
          The list will look something like "CFIF,MYTAGNAME..." --->
    <CFSET ancestorList = GetBaseTagList()>
    
    <!--- Output current tag name --->
    <CFOUTPUT>This is custom tag #ListGetAt(ancestorList,2)#</CFOUTPUT>
    <P>
    <!--- Determine whether this is nested inside a loop --->
    <CFSET inLoop = ListFindNoCase(ancestorList, "CFLoop")>
    <CFIF inLoop neq 0>
        Running in the context of a CFLoop tag.
    </CFIF>
...

1