Variables are used to replace content during request. Currently variables are only available in integrated page mode, however in the future they will be available in app mode as well.
Variables are of the form:
{%%Type.Name Param1="Value1" Param2="Value2" ... %%}
Type, name, and parameter names are all case insensitive.
Param names are specific to the variable. Param names that start with . are reserved for system use, and are not specific to a variable. Values must be surrounded in quotes, they are not optional.
If a variable does not require any parameters, in the simplest form a variable can be:
{%%Type.Name%%}
Base can be used only with numbers and alters the base that the number is emitted in. Base is applied before .Format. Values are case insensitive.
hex - Number is converted to hex. Type becomes string, and thus affects the use of .Format parameter.Format strings depend on the data type that the variable returns.
If no format is specified, the format is specified by the operating system settings.
Type (also known as a type's prefix) is one of the following:
{%Enum.ListDirs%}
IPM content consists of any content in the wwwroot. For now I want to discuss IWP (IW Pages) files which have an .html extension. We chose an .html extension so that the files would be readily recognized by HTML editors and the Delphi IDE as HTML files. They are however not limited to static content and can contain a variety of IW tags. IW Tags are of the format:
{%%TagType.TagName%%}
Tags are case insensitive and can optionally also contain attributes. For an example of an attribute, see Escaping Tags. We used the {%% and %%} markers instead of < > so that your markup can be seen in any HTML editor. These tags are used for visible content as well as invisible content, and allows for easy editing without resorting to editing only in HTML source view.
Tag types consists of one of the following:
The TagName specifies the actual tag to use. For example {%%Sys.Year%%} would be replaced with the current year. "(C) {%%Sys.Year%%} - Our Company" would become "(C) 2010 - Our Company" in the user's browser.
Unregognized tags usually generate an exception. See documentation of each tag type for specifics. Variable tags are an example of on exception to this rule.
If the tags need to be displayed directly to the browser such as is seen on this page they can be escaped in the following manner. To display:
{%%var.Phone%%}
use
{%%%var.Phone%%}
The double %% tells IntraWeb it is not a tag and should be displayed rather than processed. Only one % will be displayed to the user.