This content has been marked as final. Show 5 replies
I also wanted to know if you can modify a tag's parent tag data with GetBaseTagData(), or is this a read only data access method?
I believe so, the proper way to modify the parent tags data is with the
caller.foobar will reference variables.foobar in the parent tag.
> I also wanted to know if you can modify a tag's parent tag data with GetBaseTagData(), or is this a read only data access method?
I'm trying to use the caller scope, but it doesn't want to work. I have an attribute variable in my <cf_delay-if> that I try to write to if I'm in a nested tag:
<cfset CALLER.ATTRIBUTES.nestedIf = thisTag>
I've tried it with and without the ATTRIBUTES. but in both cases all I get at the end is an empty stucture. However, if I do a dump of CALLER.ATTRIBUTES.nestedIf and a <cfabort> right after making this call, I get what I want to see. I have no idea what's wrong!
OK, I've figured out most of my problems. I've found a way to do the nested IFs, you use the GetBaseTagData to modify a parent tag's data as using CALLER refers to the template that called the first custom tag, no matter how deeply you're nested. I have one last major problem. If I have a <cf_delay-if> tag nested in a <cf_delay-else>, everything works fine. But if I try to nest <cf_delay-if> inside another <cf_delay-if>, when I try to access the parent tag data all I get is the current tag! If there are two of the same custom tags in the context stack, is it possible to access one from the other? Help!!