Installation:
There is nothing special about the installation of this tag. Simply place the file called "URLDecodedFormat.cfm" in your Colf Fusion Custom Tags directory (ex: c:\cfusion\customtags\).
Compatibility:
I created this tag to be used with Cold Fusion Professional 3.1.1. It makes use of "IsDefined" and "CFSETTING", which I believe are only available with versions 3.0 and greater. Thus this tag will not function with versions less than 3.0, and I suspect it will work properly with versions other than 3.1.1.
Syntax:
This tag can be called two ways: to convert the value of a variable in the calling template's "Variable" scope, or to simply output the conversion of a string supplied as an attribute. The following is an example of each:
<CF_URLDecodedFormat ACTION="SETVAR" VARNAME="caller_variable_name"> <CF_URLDecodedFormat ACTION="OUTPUT" ENCODEDSTRING="string">
Attributes:
| ACTION | Required. This controls the operational behavior of the tag. If set to SETVAR you wish to have it manipulate a variable in the calling templates "Variable" scope. Use OUTPUT if you want the tag to output the result without using saving the result to a variable. |
| VARNAME | Required if using the SETVAR action. This is the name of the variable in the calling template's "Variable" scope. For example, set VARNAME to "encoded_string" if you have defined "Variables.encoded_string" with a URL encoded string. |
| ENCODEDSTRING | Required if using the OUTPUT action. This is simply the value of a URL encoded string. For example, set ENCODEDSTRING to "5%2F22%2F98" if you wish to convert the encoded version of today's date. |
Feedback:
I'm interested in ways that this tag is used. If you find it useful, or discover a bug, send e-mail to Joseph Lamoree <joseph@lamoree.com>. Enjoy.