[HideIf Comparison]Hide This HTML[/HideIf]
To hide some HTML (or [xxx] tags) only if certain conditions are met, put the text inside a [HideIf] 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 hidden. If not true, then any text or [xxx] tags inside the container will be displayed. See [ShowIf].
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 |
= |
[HideIf [username]=SAGEHEN]You're not Mr. Sagehen![/HideIf] |
|
not equal |
! |
[HideIf [random]!45]...[/HideIf] |
|
contains |
^ |
[HideIf [browsername]^Mozilla] |
|
begins with |
~ |
[HideIf [ipaddress]^245.078.013]...[/HideIf]. 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 |
< |
[HideIf [random]<50]...[/HideIf] |
|
greater than |
> |
[HideIf [lastrandom]>25]...[/HideIf] |
|
divisible by |
\ |
[HideIf [index]\3]...[/HideIf] |