Template:Ifndef
Revision as of 08:03, 16 September 2022 by Gwyneth Llewelyn (talk | contribs) (Shamelessly copied from meta.wikipedia.org)
This documentation is transcluded from Template:Ifndef/doc. (Edit | history)
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
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|}}}|}}}
See Template:Ifwpc for an overview of results, and comparisons.
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.