Template:Ifndef/doc

is a compact variant of Qif for simple "if defined then void else do" statements with blank then part. It's the opposite of ifdef.

Usage
yields result&#160; if value&#160; is blank.

This simple template cannot be substituted, it's used to simplify the following equivalent but somewhat cryptic (names don't matter) code variants:



Example
Unlike ifdef the minimalistic ifndef cannot reject a missing second parameter.

Caveats
In templates the characters "=" (&amp;#61;) and "|" (&amp;#124;) cannot be used as is in parameters. The numeric character references &amp;#61; and &amp;#124; are often good enough, but for Wiki and XHTML markup the literal characters are required:
 * 1) For | template:! ( edit•talk•links•history ) offers a workaround.
 * 2) For = the template parameter mechanism allows &#160; resulting in "" instead of &#160; resulting in "".

Substitution works only for ifdef, but not for ifndef or qif.

Source
Copied from the page on meta where it is released under the GFDL.