export_url_vars

EveAndersson.com : API Browser : export_url_vars

export_url_vars

export_url_vars [ -sign ] [ args... ]
Defined in packages/acs-core/utilities-procs.tcl

Returns a string of key=value pairs suitable for inclusion in a URL; you can pass it any number of variables as arguments. If any are defined in the caller's environment, they are included. See also export_entire_form_as_url_vars.

Instead of naming a variable you can also say name=value. Note that the value here is not the name of a variable but the literal value you want to export e.g., export_url_vars [ns_urlencode foo]=[ns_urlencode $the_value].

For normal variables, you can say export_url_vars foo:multiple. In this case, the value of foo will be treated as a Tcl list, and each value will be output separately e.g., foo=item0&foo=item1&foo=item2...

You cannot combine the foo=bar syntax with the foo:multiple syntax. Why? Because there's no way we can distinguish between the :multiple being part of the value of foo or being a flag intended for export_url_vars.

Switches:
-sign (boolean) - If this flag is set, all the variables output will be signed using ad_sign. These variables should then be verified using the :verify flag to ad_page_contract, which in turn uses ad_verify_signature. This ensures that the value hasn't been tampered with at the user's end.
[ show source ]

Show another procedure:

eve@eveandersson.com