Difference between revisions of "Template:Team"
From QWiki
m |
m (Consolidating code by cloning template:Player (they behaved differently before)) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | If flag is set - use an image link to display it. | |
− | -->{{#if:{{{flag|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{flag}}}}}}} }}</span><!-- | + | -->{{#if:{{{flag|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{flag}}}}}}} </span>|<span style="white-space:nowrap;">{{flag/tbd}} </span>}}<!-- |
− | + | Checking if there is a link= variable. If there is use it, if not load the correct link from the player link list. If link=abbr, don't link but underline name and show content of abbr= on hover. | |
− | |||
− | |||
− | |||
− | 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|}}}| | --><span style="white-space: pre">{{#if:{{{link|}}}| | ||
{{#switch: {{{link}}} | {{#switch: {{{link}}} | ||
|false={{{1}}} | |false={{{1}}} | ||
|true=[[{{{1}}}]] | |true=[[{{{1}}}]] | ||
+ | |abbr={{abbr|{{{1|}}}|{{{abbr}}}}} | ||
|[[{{{link}}}|{{{1}}}]]}} | |[[{{{link}}}|{{{1}}}]]}} | ||
− | |{{#if:{{{1|}}}|[[{{{1}}}]]|}}}}</span><!-- | + | |{{#if:{{{1|TBD}}}|[[{{{1|TBD}}}]]|{{abbr|TBD|To Be Decided}}}} |
− | + | |[[{{{1}}}]]}}</span><!-- | |
+ | |||
+ | </includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude> |
Revision as of 10:27, 19 March 2021
Documentation (view - edit)
Same as {{player}}, just other name.
Example
This code:
{{team|Orkney Clan|flag=se}} {{team|Ihasnowikipage|flag=us|link=false}}
Returns this:
- Orkney Clan
- Ihasnolink