[HideIf Comparison]Hide This HTML[/HideIf]
Hides HTML conditionally only if the comparison is true.

To hide some HTML (or [xxx] tags) only if certain conditions are met, place 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 displays. See [ShowIf].

Note: HideIf 'does the correct thing' when it hides its container: any contexts inside the [HideIf] container (e.g. [Append] or [Replace] or [Delete]) will not be executed if HideIf evaluates to true.

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

[HideIf [username]=Grant][Authenticate User Grant][/HideIf]

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]

Note: if both sides of the equation are numbers, then the comparison for greater than, less than, and equals is performed numerically. If either side is not a number, then the comparison is performed alphabetically.
 
Tip: make sure neither side of the comparison equation contains any of the special comparison letters listed above. For example, [HideIf I'm Friendly! Are you?=[question]] contains an exclamation point inside the sentence being compared, so WebDNA sees this as "I'm Friendly" is not equal to " Are you?=[question]", which is not what the author meant to compare.

The solution is to wrap each side of the comparison with [URL] contexts, like this:
[HideIf [URL]I'm Friendly! Are you?[/URL]=[URL][question][/URL]]. This causes any embedded !=>< symbols to be converted to their URL equivalents, which can then be compared correctly.