<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>GETBASETAGLIST</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">GETBASETAGLIST</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Gets ancestor tag names, starting with the parent tag.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
A comma-delimited list of uppercase ancestor tag names, as a string. The first list element is the current tag. If the current tag is nested, the next element is the parent tag. If the function is called for a top-level tag, it returns an empty string. If an ancestor does not expose data (see GetBaseTagData), its name might not be returned.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Other functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>GetBaseTagList()
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
GetBaseTagData; "High-level data exchange" in Chapter&#160;11, "Creating and Using Custom CFML Tags," in ColdFusion MX Developer's Guide
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
This function does not display the following tags or end tags in the ancestor tag list:
</p>
<ul>

<li>cfif, cfelseif, cfelse</li>

<li>cfswitch, cfcase, cfdefaultcase</li>

<li>cftry, cfcatch</li>
</ul>

<p>
This function displays the following tags only under the following conditions:
</p>
<ul>

<li>cfloop: if it uses a query attribute</li>

<li>cfoutput: if at least one of its children is a complex expression</li>

<li>cfprocessingdirective: if it has at least one other attribute besides pageencoding</li>
</ul>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;!--- This example shows the use of GetBaseTagList function. 
Typically used in custom tags. ---&gt;
&lt;cfif thisTag.executionMode is &quot;start&quot;&gt;
   &lt;!--- Get the tag context stack 
   The list will look something like &quot;CFIF,MYTAGNAME...&quot; ---&gt;
   &lt;cfset ancestorList = GetBaseTagList()&gt;
    &lt;br&gt;&lt;br&gt;Dump of GetBaseTagList output:&lt;br&gt;
   &lt;cfdump var=&quot;#ancestorList#&quot;&gt;&lt;br&gt;&lt;br&gt;
   &lt;!--- Output current tag name ---&gt;
   &lt;cfoutput&gt;This is custom tag  #ListGetAt(ancestorList,1)#&lt;/cfoutput&gt;&lt;br&gt;
   &lt;!--- Determine whether this is nested inside a loop ---&gt;
   &lt;cfset inLoop = ListFindNoCase(ancestorList, &quot;cfloop&quot;)&gt;
   &lt;cfif inLoop&gt;
      Running in the context of a cfloop tag.&lt;br&gt;
   &lt;/cfif&gt;
&lt;/cfif&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>

  </body>
</html>
