Difference between revisions of "Template:Player"

From QWiki
m
m
Line 8: Line 8:
  
 
Checking to see if flag variable is set and if so using an image link to display it.
 
Checking to see if flag variable is set and if so using an image link to display it.
-->{{#if:{{{flag|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{flag}}}}}}}&nbsp;</span>}}<!--
+
-->{{#if:{{{flag|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{flag}}}}}}}&nbsp;</span>|<span style="white-space:nowrap;">{{flag/tbd}}&nbsp;</span><!--
  
 
Checking if there is a link= variable. If there is use it, if not load the correct link from the player link list.
 
Checking if there is a link= variable. If there is use it, if not load the correct link from the player link list.

Revision as of 22:43, 23 September 2018

Documentation (view - edit)

Used for players and teams.

Example

This code:

{{player|Hib|flag=fi}}
{{player|}}
{{player|Kylo Ren|flag=se|link=shaka}}
{{player|Team Brazil|flag=br|link=abbr|abbr=GT, mur & lit}}
{{player|Ihasnowikipage|flag=us|link=false}}

Returns this:

{{#if:fi|Finland |TBD Hib - default (name as link)
{{#if:|{{flag/{{{flag}}}}} |TBD TBD - empty player with abbr To Be Decided.
{{#if:se|Sweden |TBD Kylo Ren - custom link
{{#if:br|Brazil |TBD Team Brazil - no link but abbreviation (abbr)
{{#if:us|United States |TBD Ihasnowikipage - link=false

Usage

|
Name of the player.
|flag=
Country flag using two letter ISO code. Leave empty for TBD.
|link=
Put a link to another page (not equal to the name), or:
false
Player's name is not linked.
abbr
Player's name gets a dashed underline, hover to read content. Requires |abbr= to be none-empty.
|abbr=
Abbreviation text that will display on hover, could be an array of players that a team consist of. Requires |link=abbr to be set.