Template

Difference between revisions of "Player"

From Shadow Era Wiki

 
Line 3: Line 3:
 
-->{{#if:{{{hs|}}}|{{HiddenSort|{{#switch:{{lc:{{{hs}}}}}
 
-->{{#if:{{{hs|}}}|{{HiddenSort|{{#switch:{{lc:{{{hs}}}}}
 
     |name = {{{1|}}}
 
     |name = {{{1|}}}
    |flag = {{{flag|}}}
 
 
     |{{{hs}}}}}}}}}<!--
 
     |{{{hs}}}}}}}}}<!--
 
Checking to see if flag variable is set and if so using an image link to display it.
 
-->{{#if:{{{flag|}}}|{{flag/{{lc:{{{flag}}}}}}}&nbsp;}}<!--
 
  
 
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.

Latest revision as of 09:49, 2 July 2014

(view - edit) Documentation

This template allows for adding race icons and flags in a simple manner. If you do not wish to have a link use the link=false variable.

Usage

The variables are:

|
the name of the player
|link=
There's three options:
link=true
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.
link=other
Links the player's name to other.
|hs=
Set this to "name", "race" or "flag" to make the player sortable by the values that were set for the corresponding variable, if anything else is entered that will be used for the hidden sort field.

Example

This code:

{{player|Tyler|link=false}}
{{player|Ret|hs=race|link=false}}

Returns this:

Tyler
Ret