NaviServer Built-in Commands – 5.1.0
ns_adp_bind_args - Bind ADP arguments to variables
This command assigns the arguments of the current ADP invocation to local variables. The arguments are typically provided via ns_adp_include. Each varname is assigned the corresponding argument value, in order. The number of varname parameters must match the number of arguments; otherwise, an error is raised.
The binding starts with the first argument (index 0 of ns_adp_argv). The name of the ADP itself is not included in the argument list.
Assign the ADP arguments to the specified variables.
# In a.adp: <% ns_adp_include b.adp 1 2 3 %>
# In b.adp:
<%
ns_adp_bind_args x y z
ns_adp_puts "x=$x y=$y z=$z" ;# => {x=1 y=2 z=3}
%>