Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Template:ifndef

This template provides branching without Extension:ParserFunctions for simple "if defined then void else do" statements with blank then part. It is the opposite of Template:ifdef.

Usage

{{ifndef|value|result}} yields result  if value  is blank.

It uses the code {{{2{{{1|}}}|}}}

Examples

Code Result
{{ifndef|x|y}}
{{ifndef||y}} y
{{Ifndef|2=y}} y
{{ifndef|x}}
{{ifndef|}}
{{ifndef}}

Substitution

Convenient of the parameter default mechanism is that substitution works also, without any extra code.