Difference between revisions of "Template:Tree-Start"

From War Thunder Wiki
Jump to: navigation, search
m
 
Line 3: Line 3:
 
|-{{#if:{{{2|}}}|style="display:none;"}}
 
|-{{#if:{{{2|}}}|style="display:none;"}}
 
!style="border-right:solid 1px #EEEEEE;"|
 
!style="border-right:solid 1px #EEEEEE;"|
!colspan="{{#switch: {{{1|}}}| 5=3| 6=4| 7=5}}" style="border-right:solid 1px #EEEEEE;"|<span>Researchable vehicles</span>
+
!colspan="{{#switch: {{{1|}}}| 3=1| 4=2| 5=3| 6=4| 7=5}}" style="border-right:solid 1px #EEEEEE;"|<span>Researchable vehicles</span>
 
!colspan="2"|<span>Premium vehicles</span></includeonly><noinclude>
 
!colspan="2"|<span>Premium vehicles</span></includeonly><noinclude>
 
{{doc}}
 
{{doc}}
 
[[Category:Trees]]</noinclude>
 
[[Category:Trees]]</noinclude>

Latest revision as of 07:21, 22 November 2020

This template is used at the start of a navigation table to define the number of columns and create a header. There are 2 parameters:

  • the number of vehicle columns,
  • (optional) the removal of the header ("Researchable Vehicles" & "Premium Vehicles").
Parameter Code Result Example
The number of vehicle columns in the navigation table for each nation is set to a fixed number (3 - 7). 2 columns are always reserved for premium vehicles (on the right), the rest is for researchable vehicles.
{{Tree-Start|7}}
Researchable vehicles: 5 columns
Premium vehicles: 2 columns
Category:USA aircraft
{{Tree-Start|6}}
Researchable vehicles: 4 columns
Premium vehicles: 2 columns
Category:China aircraft
{{Tree-Start|5}}
Researchable vehicles: 3 columns
Premium vehicles: 2 columns
Category:Sweden aircraft
{{Tree-Start|4}}
Researchable vehicles: 2 columns
Premium vehicles: 2 columns
Category:Coastal Fleet Britain
For custom navigation tables, the preset header can be removed to replace it with a custom one. When the second parameter is defined, the first parameter (number of columns) plays no role and can be left blank.
{{Tree-Start|6|without header}}
The header "Researchable Vehicles" / "Premium Vehicles" is hidden. Category:Anti-aircraft vehicles
{{Tree-Start||without header}}

Clean template source codes:






The template Tree-Start is used in combination with the template Template:Tree-End. Each tree opened with Tree-Start must be closed with Tree-End.

The following templates are also usually used in the navigation table:

Read the documentation about these templates to get familiar with their use.

Example Code Result
The Template:Tree-Arrow used in between linear vehicles is the same one as the one used in the client. There must be no spaces or <br> tags present. If necessary, it's possible to make the arrow longer by setting an additional parameter.
{{Tree-Unit|p-26a_34_m2}}
{{Tree-Arrow}}
{{Tree-Unit|p-26a_33}}
Item own.png
P-26A-34 M2
p-26a_34_m2.png
Arrow.png
Item own.png
P-26A-33
p-26a_33.png
The Template:Tree-Arrow-Right used in between vehicles is the same one as the one used in the client. There must be no spaces or <br> tags present. If necessary, it's possible to make the arrow longer by setting an additional parameter.
{{Tree-Unit|p-26a_34_m2}} || {{Tree-Arrow-Right}} || {{Tree-Unit|p-26a_33}}
Item own.png
P-26A-34 M2
p-26a_34_m2.png
Arrow-left.png
Item own.png
P-26A-33
p-26a_33.png
The Template:Tree-Skip is usually used in between premium and gift vehicles. It should contain no spaces or <br> tags as well. If necessary, it's possible to make the space shorter or longer by setting an additional parameter.
{{Tree-Unit|p-26a_34}}
{{Tree-Skip}}
{{Tree-Unit|b_10b}}
Item prem.png
P-26A-34
p-26a_34.png
Item prem.png
B-10B
b_10b.png
For more information about folders that merge vehicle groups, please see the corresponding template page.
{{Tree-Group|f4f_group|F4F|
  {{Tree-Unit|f4f-3}}
  {{Tree-Arrow}}
  {{Tree-Unit|f4f-4}}
}}
Item own.png
F4F-3
f4f-3.png
Arrow.png
Item own.png
F4F-4
f4f-4.png
F4F
f4f_group.png