Difference between revisions of "Template:Navigation-Start/Documentation"

From War Thunder Wiki
Jump to: navigation, search
(Created page with "{{docpage}} This template is used in combination with the Navigation-Start template.")
 
(Edits)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{docpage}}
 
{{docpage}}
  
This template is used in combination with the [[Template:Navigation-Start|Navigation-Start]] template.
+
This template is used for creating [[:Category:Navigation|navigating tables]], i.e. link tables that serve as a convenient means of navigation across a logically connected group of articles. Each navigating table consists of several parts: a header with a title, one or several rows containing links, and the end. Let’s examine an example of making a navigating table based on the Ju 87 aircraft series.
 +
 +
=== Header template parameters ===
 +
The Navigation-Header template is used in the following way:
 +
 +
<code><nowiki>{{Navigation-Start|Navigation table header}}</nowiki></code>
 +
 +
=== End template ===
 +
Each navigating table should end in the Navigation-End template. Let’s try creating a very simple empty navigating template:
 +
 +
<pre>{{Navigation-Start|Junkers}}
 +
{{Navigation-End}}</pre>
 +
 
 +
{{Navigation-Start|Junkers}}
 +
{{Navigation-End}}
 +
 
 +
=== Row templates ===
 +
The navigation table is currently empty as it contains no links. The links can be added by using the Navigation-First-Row and Navigation-Row templates. They are very easy to use:
 +
 +
<pre>{{Navigation-First-Line|Link group name}}Links
 +
{{Navigation-Line|Link group name}}Links</pre>
 +
 +
Just as the name suggests, after the header use the Navigation-First-Row template, followed by the Navigation-Row template. Let’s add two rows containing links to our navigating table. Please note that the [[:Template:-|<code><nowiki>{{-}}</nowiki></code>]] template, which adds a dividing period, must be used in between the links:
 +
 
 +
<pre>{{Navigation-Start|Junkers}}
 +
{{Navigation-First-Line|Ju.87}}{{Specs-Link|ju-87b-2}}{{-}}{{Specs-Link|ju-87r-2}}{{-}}{{Specs-Link|ju-87d-3}}{{-}}{{Specs-Link|ju-87d-5}}{{-}}{{Specs-Link|ju-87g_1}}{{-}}{{Specs-Link|ju-87g_2}}
 +
{{Navigation-Line|Ju.88}}{{Specs-Link|ju-88a-1}}{{-}}{{Specs-Link|ju-88a-4}}{{-}}{{Specs-Link|ju-88c-6}}
 +
{{Navigation-End}}</pre>
 +
 
 +
This code will generate a perfectly functional navigating table:
 +
{{Navigation-Start|Junkers}}
 +
{{Navigation-First-Line|Ju.87}}{{Specs-Link|ju-87b-2}}{{-}}{{Specs-Link|ju-87r-2}}{{-}}{{Specs-Link|ju-87d-3}}{{-}}{{Specs-Link|ju-87d-5}}{{-}}{{Specs-Link|ju-87g_1}}{{-}}{{Specs-Link|ju-87g_2}}
 +
{{Navigation-Line|Ju.88}}{{Specs-Link|ju-88a-1}}{{-}}{{Specs-Link|ju-88a-4}}{{-}}{{Specs-Link|ju-88c-6}}
 +
{{Navigation-End}}
 +
 
 +
=== Simplified version ===
 +
In addition to the regular templates, there are also simplified versions of row templates. These are called Navigation-First-Simple-Row and Navigation-Simple-Row respectively. They differ from their counterparts because they don’t add the grey area containing link group names. And they are even easier to use. Please note that the links are center-aligned for aesthetic purposes:
 +
 +
<pre>{{Navigation-Start|Series Ju.87}}
 +
{{Navigation-First-Simple-Line}}<center>{{Specs-Link|ju-87b-2}}{{-}}{{Specs-Link|ju-87r-2}}{{-}}{{Specs-Link|ju-87d-3}}{{-}}{{Specs-Link|ju-87d-5}}{{-}}{{Specs-Link|ju-87g_1}}{{-}}{{Specs-Link|ju-87g_2}}</center>
 +
{{Navigation-End}}</pre>
 +
 +
And this is what it looks like:
 +
{{Navigation-Start|Series Ju.87}}
 +
{{Navigation-First-Simple-Line}}<center>{{Specs-Link|ju-87b-2}}{{-}}{{Specs-Link|ju-87r-2}}{{-}}{{Specs-Link|ju-87d-3}}{{-}}{{Specs-Link|ju-87d-5}}{{-}}{{Specs-Link|ju-87g_1}}{{-}}{{Specs-Link|ju-87g_2}}</center>
 +
{{Navigation-End}}
 +
 
 +
=== Embedding navigating tables onto category pages ===
 +
Sometimes it can prove to be useful to add a navigating table on a category page, like in the Tank Machine Guns category, for example. Instead of creating a duplicate table by hand, you can just copy a ready-made table and then edit it according to your taste.
 +
 +
* '''expand''' – if the parameter is not void, then the table won’t be collapsible, which is exactly what you’d want on category pages. Just type “expand = oh yes!” or something like that. The table is collapsible by default.
 +
* '''width''' — changes the width of the table. The default for this is set at 100%, but keep in mind that the navigating tables are designed to be embedded into articles with two div tags, which split them by width, so the tables do not actually occupy the whole screen. Category pages are not split by div tags, so the width should be defined by using this parameter.
 +
 
 +
Example:
 +
{{Navigation-Start|Tank machine guns|expand=yes|width=60%}}
 +
 
 +
{{Navigation-First-Line|USA}}7.62 mm: [[M1919A4 (7.62 mm)|M1919A4]]{{-}}[[M37 (7.62 mm)|M37]]{{-}}[[M60D (7.62 mm)|M60D]]{{-}}[[M73 (7.62 mm)|M73]]{{-}}[[M240 (7.62 mm)|M240]]
 +
{{Navigation-Line| }}12.7 mm: [[M2HB (12.7 mm)|M2HB]]{{-}}[[M85 (12.7 mm)|M85]]
 +
 
 +
{{Navigation-First-Line|Germany}}7.62 mm: [[MG3A1 (7.62 mm)|MG3A1]]
 +
{{Navigation-Line| }}7.92 mm: [[MG13 Dreyse (7.92 mm)|MG13 Dreyse]]{{-}}[[MG34 (7.92 mm)|MG34]]{{-}}[[MG37(t) (7.92 mm)|MG37(t)]]{{-}}[[MG42 (7.92 mm)|MG42]]
 +
 
 +
{{Navigation-First-Line|USSR}}7.62 mm: [[DT (7.62 mm)|DT]]{{-}}[[Maxim's (7.62 mm)|Maxim's]]{{-}}[[SGMT (7.62 mm)|SGMT]]{{-}}[[PKT (7.62 mm)|PKT]]
 +
{{Navigation-Line| }}12.7 mm: [[DK (12.7 mm)|DK]]{{-}}[[DShK (12.7 mm)|DShK]]{{-}}[[NSVT (12.7 mm)|NSVT]]
 +
{{Navigation-Line| }}14.5 mm: [[KPV (14.5 mm)|KPV]]
 +
 
 +
{{Navigation-First-Line|Britain}}7.62 mm: [[L3A1 (7.62 mm)|L3A1]]{{-}}[[L8A1 (7.62 mm)|L8A1]]{{-}}[[L37A1 (7.62 mm)|L37A1]]
 +
{{Navigation-Line| }}7.7 mm: [[Vickers (7.7 mm)|Vickers]]
 +
{{Navigation-Line| }}7.92 mm: [[BESA (7.92 mm)|BESA]]
 +
{{Navigation-Line| }}12.7 mm: [[L21A1 (12.7 mm)|L21A1]]
 +
 
 +
{{Navigation-First-Line|Japan}}7.62 mm: [[Type 74 (7.62 mm)|Type 74]]
 +
{{Navigation-Line| }}7.7 mm: [[Type 97 (7.7 mm)|Type 97]]
 +
{{Navigation-Line| }}12.7 mm: [[Type 60 (B) (12.7 mm)|Type 60 (B)]]
 +
 
 +
{{Navigation-First-Line|France}}7.5 mm: [[MAC 31 (7.5 mm)|MAC 31]]
 +
 
 +
{{Navigation-End}}
 +
 
 +
Code:
 +
<pre>{{Navigation-Start|Tank machine guns|expand=yes|width=60%}}
 +
 
 +
{{Navigation-First-Line|USA}}7.62 mm: [[M1919A4 (7.62 mm)|M1919A4]]{{-}}[[M37 (7.62 mm)|M37]]{{-}}[[M60D (7.62 mm)|M60D]]{{-}}[[M73 (7.62 mm)|M73]]{{-}}[[M240 (7.62 mm)|M240]]
 +
{{Navigation-Line| }}12.7 mm: [[M2HB (12.7 mm)|M2HB]]{{-}}[[M85 (12.7 mm)|M85]]
 +
 
 +
{{Navigation-First-Line|Germany}}7.62 mm: [[MG3A1 (7.62 mm)|MG3A1]]
 +
{{Navigation-Line| }}7.92 mm: [[MG13 Dreyse (7.92 mm)|MG13 Dreyse]]{{-}}[[MG34 (7.92 mm)|MG34]]{{-}}[[MG37(t) (7.92 mm)|MG37(t)]]{{-}}[[MG42 (7.92 mm)|MG42]]
 +
 
 +
{{Navigation-First-Line|USSR}}7.62 mm: [[DT (7.62 mm)|DT]]{{-}}[[Maxim's (7.62 mm)|Maxim's]]{{-}}[[SGMT (7.62 mm)|SGMT]]{{-}}[[PKT (7.62 mm)|PKT]]
 +
{{Navigation-Line| }}12.7 mm: [[DK (12.7 mm)|DK]]{{-}}[[DShK (12.7 mm)|DShK]]{{-}}[[NSVT (12.7 mm)|NSVT]]
 +
{{Navigation-Line| }}14.5 mm: [[KPV (14.5 mm)|KPV]]
 +
 
 +
{{Navigation-First-Line|Britain}}7.62 mm: [[L3A1 (7.62 mm)|L3A1]]{{-}}[[L8A1 (7.62 mm)|L8A1]]{{-}}[[L37A1 (7.62 mm)|L37A1]]
 +
{{Navigation-Line| }}7.7 mm: [[Vickers (7.7 mm)|Vickers]]
 +
{{Navigation-Line| }}7.92 mm: [[BESA (7.92 mm)|BESA]]
 +
{{Navigation-Line| }}12.7 mm: [[L21A1 (12.7 mm)|L21A1]]
 +
 
 +
{{Navigation-First-Line|Japan}}7.62 mm: [[Type 74 (7.62 mm)|Type 74]]
 +
{{Navigation-Line| }}7.7 mm: [[Type 97 (7.7 mm)|Type 97]]
 +
{{Navigation-Line| }}12.7 mm: [[Type 60 (B) (12.7 mm)|Type 60 (B)]]
 +
 
 +
{{Navigation-First-Line|France}}7.5 mm: [[MAC 31 (7.5 mm)|MAC 31]]
 +
 
 +
{{Navigation-End}}</pre>

Latest revision as of 06:15, 29 August 2023

This template is used for creating navigating tables, i.e. link tables that serve as a convenient means of navigation across a logically connected group of articles. Each navigating table consists of several parts: a header with a title, one or several rows containing links, and the end. Let’s examine an example of making a navigating table based on the Ju 87 aircraft series.

Header template parameters

The Navigation-Header template is used in the following way:

{{Navigation-Start|Navigation table header}}

End template

Each navigating table should end in the Navigation-End template. Let’s try creating a very simple empty navigating template:

{{Navigation-Start|Junkers}}
{{Navigation-End}}
Junkers

Row templates

The navigation table is currently empty as it contains no links. The links can be added by using the Navigation-First-Row and Navigation-Row templates. They are very easy to use:

{{Navigation-First-Line|Link group name}}Links
{{Navigation-Line|Link group name}}Links

Just as the name suggests, after the header use the Navigation-First-Row template, followed by the Navigation-Row template. Let’s add two rows containing links to our navigating table. Please note that the {{-}} template, which adds a dividing period, must be used in between the links:

{{Navigation-Start|Junkers}}
{{Navigation-First-Line|Ju.87}}{{Specs-Link|ju-87b-2}}{{-}}{{Specs-Link|ju-87r-2}}{{-}}{{Specs-Link|ju-87d-3}}{{-}}{{Specs-Link|ju-87d-5}}{{-}}{{Specs-Link|ju-87g_1}}{{-}}{{Specs-Link|ju-87g_2}}
{{Navigation-Line|Ju.88}}{{Specs-Link|ju-88a-1}}{{-}}{{Specs-Link|ju-88a-4}}{{-}}{{Specs-Link|ju-88c-6}}
{{Navigation-End}}

This code will generate a perfectly functional navigating table:

Junkers
Ju.87  Ju 87 B-2 · Ju 87 R-2 · Ju 87 D-3 · Ju 87 D-5 · Ju 87 G-1 · Ju 87 G-2
Ju.88  Ju 88 A-1 · Ju 88 A-4 · Ju 88 C-6

Simplified version

In addition to the regular templates, there are also simplified versions of row templates. These are called Navigation-First-Simple-Row and Navigation-Simple-Row respectively. They differ from their counterparts because they don’t add the grey area containing link group names. And they are even easier to use. Please note that the links are center-aligned for aesthetic purposes:

{{Navigation-Start|Series Ju.87}}
{{Navigation-First-Simple-Line}}<center>{{Specs-Link|ju-87b-2}}{{-}}{{Specs-Link|ju-87r-2}}{{-}}{{Specs-Link|ju-87d-3}}{{-}}{{Specs-Link|ju-87d-5}}{{-}}{{Specs-Link|ju-87g_1}}{{-}}{{Specs-Link|ju-87g_2}}</center>
{{Navigation-End}}

And this is what it looks like:

Series Ju.87
Ju 87 B-2 · Ju 87 R-2 · Ju 87 D-3 · Ju 87 D-5 · Ju 87 G-1 · Ju 87 G-2

Embedding navigating tables onto category pages

Sometimes it can prove to be useful to add a navigating table on a category page, like in the Tank Machine Guns category, for example. Instead of creating a duplicate table by hand, you can just copy a ready-made table and then edit it according to your taste.

  • expand – if the parameter is not void, then the table won’t be collapsible, which is exactly what you’d want on category pages. Just type “expand = oh yes!” or something like that. The table is collapsible by default.
  • width — changes the width of the table. The default for this is set at 100%, but keep in mind that the navigating tables are designed to be embedded into articles with two div tags, which split them by width, so the tables do not actually occupy the whole screen. Category pages are not split by div tags, so the width should be defined by using this parameter.

Example:

Tank machine guns
USA  7.62 mm: M1919A4 · M37 · M60D · M73 · M240
  12.7 mm: M2HB · M85
Germany  7.62 mm: MG3A1
  7.92 mm: MG13 Dreyse · MG34 · MG37(t) · MG42
USSR  7.62 mm: DT · Maxim's · SGMT · PKT
  12.7 mm: DK · DShK · NSVT
  14.5 mm: KPV
Britain  7.62 mm: L3A1 · L8A1 · L37A1
  7.7 mm: Vickers
  7.92 mm: BESA
  12.7 mm: L21A1
Japan  7.62 mm: Type 74
  7.7 mm: Type 97
  12.7 mm: Type 60 (B)
France  7.5 mm: MAC 31

Code:

{{Navigation-Start|Tank machine guns|expand=yes|width=60%}}

{{Navigation-First-Line|USA}}7.62 mm: [[M1919A4 (7.62 mm)|M1919A4]]{{-}}[[M37 (7.62 mm)|M37]]{{-}}[[M60D (7.62 mm)|M60D]]{{-}}[[M73 (7.62 mm)|M73]]{{-}}[[M240 (7.62 mm)|M240]]
{{Navigation-Line| }}12.7 mm: [[M2HB (12.7 mm)|M2HB]]{{-}}[[M85 (12.7 mm)|M85]]

{{Navigation-First-Line|Germany}}7.62 mm: [[MG3A1 (7.62 mm)|MG3A1]]
{{Navigation-Line| }}7.92 mm: [[MG13 Dreyse (7.92 mm)|MG13 Dreyse]]{{-}}[[MG34 (7.92 mm)|MG34]]{{-}}[[MG37(t) (7.92 mm)|MG37(t)]]{{-}}[[MG42 (7.92 mm)|MG42]]

{{Navigation-First-Line|USSR}}7.62 mm: [[DT (7.62 mm)|DT]]{{-}}[[Maxim's (7.62 mm)|Maxim's]]{{-}}[[SGMT (7.62 mm)|SGMT]]{{-}}[[PKT (7.62 mm)|PKT]]
{{Navigation-Line| }}12.7 mm: [[DK (12.7 mm)|DK]]{{-}}[[DShK (12.7 mm)|DShK]]{{-}}[[NSVT (12.7 mm)|NSVT]]
{{Navigation-Line| }}14.5 mm: [[KPV (14.5 mm)|KPV]]

{{Navigation-First-Line|Britain}}7.62 mm: [[L3A1 (7.62 mm)|L3A1]]{{-}}[[L8A1 (7.62 mm)|L8A1]]{{-}}[[L37A1 (7.62 mm)|L37A1]]
{{Navigation-Line| }}7.7 mm: [[Vickers (7.7 mm)|Vickers]]
{{Navigation-Line| }}7.92 mm: [[BESA (7.92 mm)|BESA]]
{{Navigation-Line| }}12.7 mm: [[L21A1 (12.7 mm)|L21A1]]

{{Navigation-First-Line|Japan}}7.62 mm: [[Type 74 (7.62 mm)|Type 74]]
{{Navigation-Line| }}7.7 mm: [[Type 97 (7.7 mm)|Type 97]]
{{Navigation-Line| }}12.7 mm: [[Type 60 (B) (12.7 mm)|Type 60 (B)]]

{{Navigation-First-Line|France}}7.5 mm: [[MAC 31 (7.5 mm)|MAC 31]]

{{Navigation-End}}