Difference between revisions of "Template:Player/doc"

From QWiki
m (Further polishing the turd)
 
(One intermediate revision by the same user not shown)
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.  
 +
==Example==
 +
This code:
 +
<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>
  
 +
Returns this:
 +
:{{player|Hib|flag=fi}} <small>''- default (name as link)''</small>
 +
:{{player|}} <small>''- empty player with abbr To Be Decided.''</small>
 +
:{{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>
 
==Usage==
 
==Usage==
 
The variables are:
 
 
;|  
 
;|  
:the name of the player
+
: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
+
:Country flag using two letter ISO code. 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:
+
:Put a link to another page (not equal to the name), or:
:;link=true
+
:;false
::Links the players name to the Liquipedia 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.
 
::Player's name is not linked.
:;link=other
+
:;abbr
::Links the player's name to [[other]].
+
::Player's name gets a {{abbr|dashed underline|Just like this}}, hover to read content. Requires <code>|abbr=</code> to be none-empty.
 
+
;|abbr=
==Example==
+
:Abbreviation text that will display on hover, could be an array of players that a team consist of. Requires <code>|link=abbr</code> to be set.
This code:
 
<nowiki>{{player|SoD|flag=se}}</nowiki>
 
<nowiki>{{player|Hib|flag=fi}}</nowiki>
 
<nowiki>{{player|Ihasnowikipage|flag=us|link=false}}</nowiki>
 
 
 
Returns this:
 
:{{player|SoD|flag=se}}
 
:{{player|Hib|flag=fi}}
 
:{{player|Ihasnowikipage|flag=us|link=false}}
 

Latest revision as of 15:14, 10 November 2020

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:

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

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.