Template:Ifn: Difference between revisions
Dubiousjim (talk | contribs) (Add docs) |
Dubiousjim (talk | contribs) m (Protected "Template:Ifn": Template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
<nowiki>{{</nowiki>ifn|<var>value</var>|<var>result</var>}} yields <var>result</var> if <var>value</var> isn't blank. | <nowiki>{{</nowiki>ifn|<var>value</var>|<var>result</var>}} yields <var>result</var> if <var>value</var> isn't blank. | ||
One limitation: {{ | One limitation: <nowiki>{{</nowiki>ifn|2=<var>result</var>}} yields <var>result</var> (but works properly if <var>value</var> is defined and empty). | ||
See [http://meta.wikimedia.org/wiki/Template:Ifdef Wikimedia's Ifdef] | See [http://meta.wikimedia.org/wiki/Template:Ifdef Wikimedia's Ifdef] | ||
</noinclude><includeonly>{{{1{{{1|}}}|{{{2|}}}}}}</includeonly> | </noinclude><includeonly>{{{1{{{1|}}}|{{{2|}}}}}}</includeonly> |
Latest revision as of 08:35, 30 May 2017
Template Documentation for Ifn
This page is a template and should only be used as part of other articles. For more information, read Help:Template.
Please do not experiment with this template; you could ruin all pages using this template. If you want to edit this template, copy the text to Template:Sandbox, edit and test it there, and copy it back when it works.
Feel free to voice your opinion regarding this template.Template branching without Extension:ParserFunctions
Template Documentation
{{ifn|value|result}} yields result if value isn't blank.
One limitation: {{ifn|2=result}} yields result (but works properly if value is defined and empty).