[ShowIf Comparison]Show This HTML[/ShowIf]
To display some HTML (or [xxx] tags) only if certain conditions are met, put the text inside a [ShowIf] container. The comparison, which may contain any [xxx] tags, is first evaluated to see if it is true, and if true then the contained text is displayed. 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):
Try 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 comparison work as expected. |
less than |
< |
[ShowIf [random]<50]...[/ShowIf] |
greater than |
> |
[ShowIf [lastrandom]>25]...[/ShowIf] |
divisible by |
\ |
[ShowIf [index]\3]...[/ShowIf] |