|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Is this a bug?
Author: Claude_Schnéegans
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:63647#349519
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
|
June 19, 2013
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||