Difference between revisions of "Template:Tree-Unit"

From War Thunder Wiki
Jump to: navigation, search
(the thing i suggested in the past about the background being tied to {{#unit}} should work now)
m (Reverted edits by U30585107 (talk) to last revision by VolgaIgor)
Line 1: Line 1:
<includeonly><div class="tree-item"><div class="tree-item-background">[[File:Item_{{#ifeq:{{#unit:{{{1|}}}|premium}}|0 |{{#ifeq:{{#unit:{{{1|}}}|squadron}}|0 |own|squad}}|prem}}.png|link={{#unit:{{{1|}}}|article}}|class=tree-item-js]]</div><div class="tree-item-text"><span class="tree-item-text-scroll">{{#if:{{#unit:{{{1|}}}|pseudonym}}|{{#unit:{{{1|}}}|pseudonym}}|{{{1|}}}}}</span></div><div class="tree-item-img">{{#unit:{{{1|}}}|icon}}</div></div></includeonly><noinclude>
+
<includeonly><div class="tree-item"><div class="tree-item-background">[[File:Item_own.png|link={{#unit:{{{1|}}}|article}}|class=tree-item-js]]</div><div class="tree-item-text"><span class="tree-item-text-scroll">{{#if:{{#unit:{{{1|}}}|pseudonym}}|{{#unit:{{{1|}}}|pseudonym}}|{{{1|}}}}}</span></div><div class="tree-item-img">{{#unit:{{{1|}}}|icon}}</div></div></includeonly><noinclude>
 
{{doc}}
 
{{doc}}
<!---delete after testing--->
 
{{Tree-Unit|us_m4a2_sherman}}
 
{{Tree-Unit|us_m4_sherman_calliope}}
 
{{Tree-Unit|b_48_firecrest}}
 
 
[[Category:Trees]]</noinclude>
 
[[Category:Trees]]</noinclude>

Revision as of 14:23, 18 August 2020

The template inserts a navigating icon for a vehicle into a table by placing a corresponding miniature copy and a link to a matching article in accordance with the parser data.

The template must be defined by the following parameter: the in-game vehicle code.

Example of use:

Code Result
{{Tree-Unit|us_m4a2_sherman}}
Item own.png
M4A2
us_m4a2_sherman.png
{{Tree-Unit|us_m4_sherman_calliope}}
Item prem.png
Calliope
us_m4_sherman_calliope.png
{{Tree-Unit|b_48_firecrest}}
Item squad.png
Firecrest
b_48_firecrest.png