listvariables

To list all the text and/or math variables which have been set earlier on a page, [listvariables] will display them all in name-value pairs.
[listvariables][name] = [value][/listvariables]

Parameters

ParameterDescription
Name(Optional) The name of the variable to list.
 Exact(Optional) T(rue) or F(alse) whether to exactly match the name of the parameter or match any name that contains the "name" value. (Default value is true).
Type(Optional) Text or Math. Default is to list variables of both types. Specify Text for Text variables only, Math for Math variables only.

The following tags are available inside a [listvariables] context:

TagDescription
[name]The name of the variable.
[value]The value associated with the variable.
[index]A number from 1 to the total number of variables, indicating this field's index position in the list
[secure]Displays "T" if the variable is secure, "F" otherwise.
[break]From v8.1, if the [listvariables] context sees the [break] tag while executing a loop, it will stop looping, once it finishes the current loop. Thus the [break] tag should only appear in a [showif] statement that is evaluated at the end (bottom) of the loop.

This context is extremely useful to debug a page.
To display a list of all the text/math variables available, put a [listvariables] context into a template.

Example WebDNA code:
The following will list all the text/math variables available to a page:
[listvariables]
  [index], [name] = [value]<br>
[/listvariables]

The [listvariables] context has optional parameters in order to modify the list of text/math variables produced.
Example WebDNA code:
The following are the values of all the text/math variables with the name "shipping":
[listvariables name=shipping&exact=T]
  [index], [name] = [value]<br>
[/listvariables]
Example WebDNA code:
The following are the values of all the math variables:
[listvariables type=math]
  [index], [name] = [value]<br>
[/listvariables]