Difference between revisions of "Template:Player/doc"

From QWiki
m (Rework of doc including new abbr)
Line 1: Line 1:
This template allows for adding race icons and flags in a simple manner. If you do not wish to have a link use the {{tl|Playersp}} template instead.
+
Used for players and teams.  
  
 
==Usage==
 
==Usage==
Line 7: Line 7:
 
:the name of the player
 
:the name of the player
 
;|flag=  
 
;|flag=  
:name country of which the player comes from and this returns with the flag of said country in front of the name  
+
:name country of which the player comes from and this returns with the flag of said country in front of the name. Leave empty for {{Flag/tbd}}.
;|race=
 
:fill in the race of the player as initial or name this returns the corresponding race icon in front of the name.
 
 
;|link=
 
;|link=
 
:There's three options:
 
:There's three options:
:;link=true
+
:;link=true or empty
::Links the players name to the Liquipedia page with that name.
+
::Links the player name to the QWiki page with that name.
 
::''Note: This is the default.  '''link=true''' behaves the same as simply not specifying a '''link=''' parameter.''
 
::''Note: This is the default.  '''link=true''' behaves the same as simply not specifying a '''link=''' parameter.''
 
:;link=false
 
:;link=false
 
::Player's name is not linked.
 
::Player's name is not linked.
:;link=other
+
:;link=abbr
::Links the player's name to [[other]].
+
::Player gets a dashed underline you can hover to read explanation. Requires |abbr= to be none-empty.
 +
:;link=anything
 +
::Links the player's name to [[anything]].
 +
;|abbr=
 +
:Abbreviation text that will display on hover, could be an array of players the team consist of. Requires |link=abbr to be set.
 +
 
  
 
==Example==
 
==Example==
 
This code:
 
This code:
<nowiki>{{player|SoD|flag=se}}</nowiki>
 
 
  <nowiki>{{player|Hib|flag=fi}}</nowiki>
 
  <nowiki>{{player|Hib|flag=fi}}</nowiki>
 +
<nowiki>{{player|}}</nowiki>
 +
<nowiki>{{player|Kylo Ren|flag=se|link=shaka}}</nowiki>
 +
<nowiki>{{player|Team Brazil|flag=br|link=abbr|abbr=GT, mur & lit}}</nowiki>
 
  <nowiki>{{player|Ihasnowikipage|flag=us|link=false}}</nowiki>
 
  <nowiki>{{player|Ihasnowikipage|flag=us|link=false}}</nowiki>
  
 
Returns this:
 
Returns this:
:{{player|SoD|flag=se}}
+
:{{player|Hib|flag=fi}} <small>''- default (name as link)''</small>
:{{player|Hib|flag=fi}}
+
:{{player|}} <small>''- empty player with abbr To Be Decided.''</small>
:{{player|Ihasnowikipage|flag=us|link=false}}
+
:{{player|Kylo Ren|flag=se|link=shaka}} <small>''- custom link''</small>
 +
:{{player|Team Brazil|flag=br|link=abbr|abbr=GT, mur & lit}} <small>''- no link but abbreviation (abbr)''</small>
 +
:{{player|Ihasnowikipage|flag=us|link=false}} <small>''- link=false''</small>

Revision as of 14:09, 10 November 2020

Used for players and teams.

Usage

The variables are:

|
the name of the player
|flag=
name country of which the player comes from and this returns with the flag of said country in front of the name. Leave empty for TBD.
|link=
There's three options:
link=true or empty
Links the player name to the QWiki page with that name.
Note: This is the default. link=true behaves the same as simply not specifying a link= parameter.
link=false
Player's name is not linked.
link=abbr
Player gets a dashed underline you can hover to read explanation. Requires |abbr= to be none-empty.
link=anything
Links the player's name to anything.
|abbr=
Abbreviation text that will display on hover, could be an array of players the team consist of. Requires |link=abbr to be set.


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:

Finland Hib - default (name as link)
TBD TBD - empty player with abbr To Be Decided.
Sweden Kylo Ren - custom link
Brazil Team Brazil - no link but abbreviation (abbr)
United States Ihasnowikipage - link=false