ColdFusion Markup Language - Custom Tags

Custom Tags

CFML allows language extensions in the form of custom tags, which are tags created by the developer that are not part of the CFML language itself. Custom tags are regular CFML files which are intended to be invoked as tags, although it is possible to treat a template as both a custom tag and a regular template. Custom tags are written in CFML and are typically invoked by prefixing the custom tag's file name with cf_, although there are other ways to invoke custom tags.

If a template is invoked as a custom tag, the attributes used to invoke that tag are available within the tag in a special attributes structure and the variables contained in the calling page are accessible via the caller structure.

For example, if writing an add tag which takes two attributes and adds them together, the sum.cfm page would look like this:

Assuming the template and tag are in the same directory, the tag can be invoked thus:

CFX tags are custom tags which are developed using Java or C++, and are prefixed with cfx_ just like cf_. Java and C++ tags are added to the CFML runtime environment using the CFML engine's administrator or by editing configuration files.

On some CFML engines JSP tags can also be included in CFML pages using the tag.

Read more about this topic:  ColdFusion Markup Language

Famous quotes containing the words custom and/or tags:

    It has become the custom in our country to expect all Chief Executives, from the President down, to conduct activities analogous to an entertainment bureau. No occasion is too trivial for its promoters to invite them to attend and deliver an address.
    Calvin Coolidge (1872–1933)

    Worry and brown desk
    Stain it by infusion. There aren’t enough tags at the end,
    And the grove is blind, blossoming, but we are too porous to hear it.
    John Ashbery (b. 1927)