Text Context [Text]Text Variable Assignment[/Text]
Stores a text variable that can be used later in the template.

To remember some text for use later in a page, assign a text variable using the [Text] context. You may assign as many named text variables (similar to [math] variables, except they store textual information instead of numbers) as you want per page (RAM limited). The length of the text is also only limited to RAM.

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

[Text Show=F]sentence1=This is a big long sentence, don't you think?[/Text]
[Text]name=John[/Text]
[Text]sentence1[/Text]
[Text]name[/Text]
[name]

In the example above, the displayed text will be

This is a big long sentence, don't you think?
John
John

The Text context looks for an equal sign "=" in the body of the text, and if it finds one, assumes you are assigning a new value to a new text variable. If no equal sign is present in the body of the text, it assumes you want to retrieve the value of a previously-stored variable. Reassigning a text variable to a new value replaces the previous value.

Note that you do not have to use the [Text] context to display a text variable; you may simply place the variable name inside brackets like so: [varname]. Both [Text]varname[/Text] and [varname] display the same thing.

Parameters Description 
multi
(optional) "T" or "F". Allows you to assign more than one text variable in a single context. [Text multi=T]var1=Joe&var2=Fred[/Text] simultaneously assigns two variables, named "var1" and "var2" to the values "Joe" and "Fred."
New for 4.0
secure
(optional) "T" or "F". Defaults to "T". Setting secure=F makes this text variable overrideable by incoming form variables. This is not recommended, and the default behavior is secure. If you really want outside visitors to your web site to be able to change the values of your internal text variables (usually with a <form>), then you may use the non-secure version of this parameter.
show
(optional) "T" or "F". Default behavior is to hide text when assigning to a text variable. If you want the text to be shown at the same time it is assigned to a variable, you may set Show=T. If you set multi=T at the same time, then no text will be displayed.

User Contributed Notes
TextContext  

Copyright © 2008 WebDNA Software Corporation, Inc.