Difference between revisions of "Template:Main/Documentation"

From War Thunder Wiki
Jump to: navigation, search
(Added template data so template can (hopefully, if I did this right) be used directly from the visual editor)
m
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{docpage}}
 
{{docpage}}
  
This template is used for formatting links to more-detailed articles.
+
This template is used for formatting links to more detailed articles.
 
<pre>{{main
 
<pre>{{main
 
   |Article 1
 
   |Article 1
Line 18: Line 18:
 
   |l2=Displayed text of link 2
 
   |l2=Displayed text of link 2
 
}}</pre>
 
}}</pre>
 +
 +
{{Notice|'''Note:''' The character 'l' in "l1" is a lowercase 'L', NOT a capital "i" or a "1"}}
  
 
== Examples ==
 
== Examples ==
Line 33: Line 35:
 
| {{Main|Aviation|Ground vehicles|Fleet|l1=Avia|l2=Ground|l3=Navy}}
 
| {{Main|Aviation|Ground vehicles|Fleet|l1=Avia|l2=Ground|l3=Navy}}
 
|}
 
|}
 +
 +
{{sp-begin|TemplateData}}
 
<templatedata>
 
<templatedata>
 
{
 
{
Line 87: Line 91:
 
}
 
}
 
},
 
},
"description": "This template is used for formatting links to more-detailed articles.\n\nIt creates the a line of text stating: \"Main Article:\" or \"Main Articles:\" followed by between 1 and 5 articles to link to.",
+
"description": "This template is used for formatting links to more detailed articles. It creates a line of text stating: \"Main article:\" or \"Main articles:\" followed by between 1 and 5 articles to link to.",
 
"paramOrder": [
 
"paramOrder": [
 
"1",
 
"1",
Line 103: Line 107:
 
}
 
}
 
</templatedata>
 
</templatedata>
 +
{{sp-end}}

Revision as of 17:55, 15 August 2020

This template is used for formatting links to more detailed articles.

{{main
  |Article 1
}}

You can add up to five links, if required.

{{main
  |Article 1
  |Article 2
  |Article 3
}}

By default, the text of the link is set as the name of the page to which it directs. If needed, you can change the text the following way:

{{main
  |Article 1
  |Article 2
  |l1=Displayed text of link 1
  |l2=Displayed text of link 2
}}
Msg-info.png Note: The character 'l' in "l1" is a lowercase 'L', NOT a capital "i" or a "1"

Examples

Code Result
{{Main|Aviation}}
Main article: Aviation
{{Main|Aviation|Ground vehicles|Fleet}}
Main articles: Aviation, Ground vehicles, Fleet
{{Main|Aviation|Ground vehicles|Fleet|l1=Avia|l2=Ground|l3=Navy}}
Main articles: Avia, Ground, Navy