Making Tag Data Accessible To Child Tags

ColdFusion supports the creation of Custom Tag families – parent and child tags that together form a complete tag set. CFML includes tags and functions that are used to bridge the gap between these tags so that data can be shared (or published) as needed. But one behavior that baffles most developers is variables created in “start” execution mode within a parent tag are available in “end” mode, but not to child (associated) tags in “inactive” mode. So how can child tags access these variables? The trick is to create them within the parent tag’s ThisTag scope, this way they’ll be accessible along with the other scope members to any and all associated tags. (Applies to: ColdFusion 4 (or later))

Leave a Reply