Hi,
According to CF docs for GetBaseTagData(tagname [, instancenumber ]),
"instancenumber = (Optional) Number of ancestor levels to jump before
returning data. The default value is 1 (closest ancestor)."
Then, suppose I call the function from a custom tag with its own name in
parameter (I want to know if this tag is at level 0 or if it is embeded inside
another one)
If instancenumber EQ 1, I expect the function will jump 1 of ancestor levels to
jump before returning data, then OUTSIDE the custom tag, right?
But instead, the function seems to return the tag itself as it's "closest
ancestor"
As far as I know, I'm not my own ancestor.
(Genealogically, I'm my own parent, at level 0, but I'm not my ancestor)
Try tis code:
1º in some template (don't call it test.cfm):
<CF_test>
2º in test.cfm
<CFSET tagData = getBaseTagData("CF_TEST", 1)>
<CFDUMP var="#tagData#">
In my book, this should throw an error since there is no ancestor "CF_TEST"
Instead, it returns a structure for CF_TEST
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349519
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm