To display HTML (or [xxx] tags) only if certain conditions are met, place the text inside a [ShowIf] context. The comparison, which may contain any [xxx] tags, is first evaluated to see if it is true, and if true, the contained text displays. If not true, then any text or [xxx] tags inside the container will be ignored. See [HideIf].
Example (normally you would put the following text into a .tpl file on your server and use a web browser to link to it):
Comparisons are always case-insensitive so "grant" equals "GRANT".
Comparison | Example | |
---|---|---|
equal
|
|
[ShowIf [username]=SAGEHEN]Welcome Mr. Sagehen[/ShowIf] |
not equal
|
|
[ShowIf [random]!45]...[/ShowIf] |
contains
|
|
[ShowIf [browsername]^Mozilla] |
begins with
|
|
[ShowIf [ipaddress]~245.078.013]...[/ShowIf]. Notice the IP address has been typed with 3 digits in each portion of the address. This is very important for making these comparisons work as expected. |
less than
|
|
[ShowIf [random]<50]...[/ShowIf] |
greater than
|
|
[ShowIf [lastrandom]>25]...[/ShowIf] |
divisible by
|
|
[ShowIf [index]\3]...[/ShowIf] |