Open main menu
Template documentation[view] [edit] [history] [purge]

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.

UsageEdit

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

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

See Template:Ifwpc for an overview of results, and comparisons.

ExamplesEdit

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

SubstitutionEdit

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