Dota 2 Wiki
m (hmm)
(No more #ifexist. Might work better on pages with many occurrences)
Line 1: Line 1:
 
<includeonly>{{#switch:{{lc:{{{1}}}}}
 
<includeonly>{{#switch:{{lc:{{{1}}}}}
| #default = <span style="white-space:nowrap">[[{{#ifexist:{{#vardefineecho:teamicon|File:Team icon {{{1}}}.png}}|{{#var:teamicon}}|{{#ifexist:{{#vardefineecho:teamicon|File:{{#show:{{{1}}}|?icon#}}}}|{{#var:teamicon}}|File:Team icon Default.png}}}}|{{{2|20}}}px|link={{{1}}}]] {{#ifexist:{{{1}}}|[[{{#show:{{{1}}}|?name#}}|{{{1}}}]]|{{{1}}}}}</span>
+
| #default = <span style="white-space:nowrap">[[File:{{#if:{{#vardefineecho:teamicon|{{#show:{{{1}}}|?icon#}}}}|{{#var:teamicon}}|Team icon Default.png}}|{{{2|20}}}px|link={{{1}}}]] {{#if:{{#vardefineecho:teamname|{{#show:{{{1}}}|?name#}}}}|[[{{{1}}}|{{#var:teamname}}]]|{{{1}}}}}</span>
 
| tbd = {{Tooltip|TBD|To be decided}}
 
| tbd = {{Tooltip|TBD|To be decided}}
 
| tba = {{Tooltip|TBA|To be announced}}
 
| tba = {{Tooltip|TBA|To be announced}}

Revision as of 15:22, 15 October 2017

Documentation for Template:Team ID [ Usage | View | Edit | Purge | Subpages ]

Lua logo
▶️ Swapsies!
This template uses Lua.
Its code can be found under Module:Team ID.


Use this template for displaying teams in articles together with their names. Image size is optional, defaults at 20px.
Usage:
{{Team|<name>|<size>}}
[[File:{{#show:Natus Vincere|?icon#}}|20px|link=Natus Vincere]] {{#show:Natus Vincere|?name#}}
{{Team|TBD}}
TBD
{{Team|TBA}}
TBA
It will change automatically if that team doesn't exist:
{{Team|QWERTY12345}}
[[File:{{#show:QWERTY12345|?icon#}}|20px|link=QWERTY12345]] {{#show:QWERTY12345|?name#}}

TemplateData

Generate a link to the teams page with a small icon next to it.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Team1

The teams name.

Example
Team Liquid
Stringrequired
Size2

The icons size.

Default
20x20px
Stringoptional
Reversereverse

Reverse the layout. Mainly for use in templates.

Booleanoptional