ad_export_vars (public)ad_export_vars [ -form ] [ -exclude exclude ] [ -override override ] \
[ include ]
Defined in packages/acs-core/utilities-procs.tclHelps export variables from one page to the next,
either as URL variables or hidden form variables.
It'll reach into arrays and grab either all values or individual values
out and export them in a way that will be consistent with the
ad_page_contract :array flag.
Example:
doc_body_append [ad_export_vars { msg_id user(email) { order_by date } }]
will export the variable msg_id and the value email from the array user ,
and it will export a variable named order_by with the value date .
The args is a list of variable names that you want exported. You can name
- a scalar varaible,
foo ,
- the name of an array,
bar ,
in which case all the values in that array will get exported, or
- an individual value in an array,
bar(baz)
- a list in [array get] format { name value name value ..}.
The value will get substituted normally, so you can put a computation in there.
A more involved example:
set my_vars { msg_id user(email) order_by }
doc_body_append [ad_export_vars -override { order_by $new_order_by } $my_vars]
- Switches:
-
-form (boolean) - set this parameter if you want the variables exported as hidden form variables,
as opposed to URL variables, which is the default.
-exclude (optional) - takes a list of names of variables you don't want exported, even though
they might be listed in the args. The names take the same form as in the args list.
-override (optional) - takes a list of the same format as args, which will get exported no matter
what you have excluded.
- Parameters:
-
include (optional)
- Author:
- Lars Pind <lars@pinds.com>
- Created:
- 21 July 2000
|