Difference between revisions of "Template:2Players"

From QWiki
(Simple template to display 1 flag and 2 players for 2on2 purposes)
 
m (Added support for assigning only 1 player (could be Teamname, instead of 2 teammates))
 
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{1}}}}}}}&nbsp;</span>|<span style="white-space:nowrap;">{{flag/tbd}}&nbsp;</span>}}{{#if:{{{2|}}}|[[{{{2|}}}]]|{{Abbr|TBD|To Be Decided}}}} <span style="color:#337ab7;">&</span> {{#if:{{{3|}}}|[[{{{3|}}}]]|{{Abbr|TBD|To Be Decided}}}}
+
<includeonly>{{#if:{{{1|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{1}}}}}}}&nbsp;</span>|<span style="white-space:nowrap;">{{flag/tbd}}&nbsp;</span>}}{{#if:{{{2|}}}|[[{{{2|}}}]]|{{Abbr|TBD|To Be Decided}}}} {{#if:{{{3|}}}|<span style="color:#337ab7;">&</span> [[{{{3|}}}]]|}}
 
</includeonly><noinclude>[[Category:Templates]]</noinclude><noinclude>{{documentation}}</noinclude>
 
</includeonly><noinclude>[[Category:Templates]]</noinclude><noinclude>{{documentation}}</noinclude>

Latest revision as of 10:11, 12 March 2021

Documentation (view - edit)

This template outputs one flag, then two (or only one) linked players. If there's 2 players, they're separated by a blue "&".

2 players

The following code:

{{2Players|usca|BLooD_DoG|BogoJoker}}

Gives us: US & Canada BLooD_DoG & BogoJoker


1 player (or team)

This gives same output as {{Player}}, but other templates (Infobox league) use this to be able to display either or.
The following code:

{{2Players|usca|Clan Unf!|}}

Gives us: US & Canada Clan Unf!

Use

  • First value is flag, leave empty for TBD
  • Second value is player1
  • Third value is player2
    • If both second and third values are empty, it will display as US & Canada TBD