Writing a custom tag in CFML is no different from writing any CFML template. You can use all CFML constructs, as well as HTML.
Custom tags are stored either in the current directory or under the customtags
directory. You call them using the CF_ prefix. Beyond that, you are free to use any naming convention that fits your development practice. Unique descriptive names make it easy for you and others to find the right tag. For example, the tag name CF_getweather invokes the file getweather.cfm
If you are concerned about possible name conflicts when invoking a custom tag or if the application must use a variable to dynamically call a custom tag at runtime, the CFMODULE element provides a solution.
Note | While tag names in templates are case-insensitive, custom tag file names must be lower case on UNIX. |
CFML custom tags support both required and optional attributes. Attributes are defined as name-value pairs. Custom tag attributes conform to CFML coding standards: