• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Custom Tags

If there’s not a ColdFusion tag that does what you need to do, you can create your own. If you find yourself using sections of code repeatedly or if there’s a particular task you need to do often, such as validating an email address string or credit card number, you can create your own custom tag. Custom tags can encapsulate large amounts of ColdFusion functionality into a single, easy-to-use tag.

Custom tags typically are stored in the C:\CFusionMX\CustomTags directory and are then available to every application hosted on that server. If you do not have access to this directory (as in a commercial hosting environment), however, the tags also can be stored in the same directory as the template using the custom tag. You simply save your code template into the appropriate directory, and when you need to reference it, you do so by using a CF_ prefix.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint