Template:Firstdata/doc

From blackwiki
< Template:Firstdata
Revision as of 13:07, 3 October 2019 by imported>DePiep
Jump to navigation Jump to search

In template code, one can list multiple input parameters, and this template will return the first input value that is not blank.

Usage

Can have up to five parameters input. Will return the first parameter that is not blank.

{{firstdata
|1=
|2=
|3=
|4=
|5=
}}

or

{{firstdata|||}}

Practical use is inside an other template:

{{firstdata|{{{foo|}}} |{{{bar|}}} }}

Whitespace is stripped.

example

  • {{firstdata||two|three}} → two
  • {{firstdata|one||three}} → one
  • {{firstdata|||}} →