Difference between revisions of "Template:Player"
From QWiki
*>XantoM m (Removed CHTV link.) |
(Created page with "<includeonly><!-- Starting with checking if the hidden sort variable is set if so it'll go into a switch to output the right variable as hidden. -->{{#if:{{{hs|}}}|{{HiddenSor...") |
||
Line 1: | Line 1: | ||
− | < | + | <includeonly><!-- |
− | + | Starting with checking if the hidden sort variable is set if so it'll go into a switch to output the right variable as hidden. | |
− | <!-- | + | -->{{#if:{{{hs|}}}|{{HiddenSort|{{#switch:{{lc:{{{hs}}}}} |
− | + | |race = {{{race|}}} | |
− | + | |name = {{{1|}}} | |
− | {{ | + | |flag = {{{flag/}}} |
− | + | |{{{hs}}}}}}}}}<!-- | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <!-- | ||
− | + | Checking to see if flag variable is set and if so using an image link to display it. | |
− | + | -->{{#if:{{{flag|}}}|{{flag/{{lc:{{{flag}}}}}}} }}<!-- | |
− | |||
− | + | Checking if race is entered, if so using the RaceIconSmall template. | |
− | + | -->{{#if:{{{race|}}}|{{RaceIconSmall|{{{race}}}}} }}<!-- | |
− | <!-- | ||
− | |||
− | |||
− | = | + | Checking if there is a link= variable. If there is use it, if not load the correct link from the player link list. |
− | < | + | --><span style="white-space: pre">{{#if:{{{link|}}}| |
− | {{ | + | {{#switch: {{{link}}} |
− | + | |false={{{1}}} | |
− | [[ | + | |true=[[{{{1}}}]] |
− | <!-- | + | |[[{{{link}}}|{{{1}}}]]}} |
− | [[Category: | + | |{{#if:{{{1|}}}|[[{{{1}}}]]|}}}}</span><!-- |
− | + | --></includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude> | |
− |
Revision as of 21:52, 18 December 2016
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:
- Hib - default (name as link)
- - empty player with abbr To Be Decided.
- Kylo Ren - custom link
- Team Brazil - no link but abbreviation (abbr)
- Ihasnowikipage - link=false
Usage
- |
- Name of the player.
- |flag=
- Country flag using two letter ISO code. Leave empty for .
- |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.