ListVariables Context [ListVariables options]Variable Tags[/ListVariables]
New in 4.0
Lists all the text and/or math variables which have been set earlier on a page.

To display a list of all the text or math variables available, put a [ListVariables] context into a template.

Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):

The following are all the text and math variables available to this page:<br>

The [ListVariables] context has optional parameters that are placed within the beginning tag in order to modify the list of variables produced.


The following are the values of all the text variables created on this template so far:<br>
[ListVariables type=text]

The following are the values of all the math variables created on this template whose variable name begins with "fred":<br>
[ListVariables type=math&name=fred]

Listing the variables with a given name is useful for displaying arrays of variables.

The following parameters are optional to the [ListVariables] context:
Parameter Description
(Optional) The name of the variable to list.
(Optional) T(rue) or F(alse) whether to exactly match the name of the variable or match any name containing the "name" value. (Default value is true.)
(Optional) Text or Math. Default is to list variables of both types, but if you specify Text then only Text variables will be listed, and if you specify Math then only Math variables will be listed.

The following tags are available inside a [ListVariables] context:
Tag Description
The name of the variable.
The value associated with the variable.
A number from 1 to the total number of variables, indicating this field's index position in the list
(available from version 4.0.2rc2 and later)
Displays "T" if the variable is secure, "F" otherwise.

User Contributed Notes

Copyright © 2008 WebDNA Software Corporation, Inc.