AdobeStock_455007340

Accessing Global Variables From Within Custom Tags

The APPLICATION.CFM file is often used to define application wide (or global) variables that are visible to all code. However, Custom Tags do not process the APPLICATION.CFM file, so code within Custom Tags will not have access to these variables unless you explicitly pass them as attributes. You could also include explicit files from within a Custom Tag, but this is generally not a recommended practice as Custom Tags should be self-sufficient and should ideally not rely on external files at all. (Applies to: ColdFusion 4 (or later))

Leave a Reply