Template talk:Concat

Latest comment: 19 years ago by Patrick in topic History

Documentation

edit

Wikitext

edit

This Template:Concat (talk, backlinks, edit) contains:


{{{1|}}}{{{2|}}}{{{3|}}}...{{{150|}}}


Purpose

edit

This template concatenates parameters 1 − 150, as far as defined.


Usage

edit
{{Concat
  |data
  |data
  |...
}}

or

{{Concat
  |number=data
  |number=data
  |...
}}

The first form is not useful to apply directly; it can be useful in another template, e.g. Template:For. The second form sorts the data by parameter number, and removes duplicates: only the lastly defined value of a parameter counts; however, a defined value cannot be made undefined by any code later in the template call.

Examples

edit
Code Result
{{Concat|}}
{{Concat|a}} a
{{Concat|a|b}} ab
{{Concat|a|b|c}} abc
{{Concat|2=a|3=b|1=c}} cab
{{Concat|2=a|3=b|2=c}} cb
{{Concat|100=a|200=b}} ab
{{Concat|1=2=3|4=5=6}} 2=35=6
{{for|call=concat and link to w:en:|, |pc1n=1|pc1v=John_|pv=2|Lennon|Wayne}} John_LennonJohn_Wayne

The last example uses Template:concat and link to w:en: containing "[[w:en:{{{1|}}}{{{2|}}}|{{{1|}}}{{{2|}}}]]".

See also

edit

History

edit
Created
Patrick 10:43, 13 December 2005 (UTC)Reply

Discussion

edit
Return to "Concat" page.