Template:Ifwp

From HeRO Wiki
Jump to: navigation, search


This template's code is:

{{{3{{{1|}}}|{{{1{{{1|}}}|{{{2|}}}}}}}}}

Usage

  • If parameter 1 is defined and not empty, parameter 2 will be returned.
  • If parameter 1 is defined and empty, parameter 3 will be returned.
  • If parameter 1 is not defined at all, {{{1}}} will be returned. (This should be avoided.)

This template is best used in other templates that can specify the default parameters in their usage documentation, such that parameter 1 is always defined, even if it's empty.

See Template:Ifwp on meta.wikimedia.org