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)
(Undid last edit. Think i put this on the wrong page)
Line 33: Line 33:
 
| {{Main|Aviation|Ground vehicles|Fleet|l1=Avia|l2=Ground|l3=Navy}}
 
| {{Main|Aviation|Ground vehicles|Fleet|l1=Avia|l2=Ground|l3=Navy}}
 
|}
 
|}
<templatedata>
 
{
 
"params": {
 
"1": {
 
"label": "Page 1",
 
"description": "The name of the first page to link to",
 
"type": "wiki-page-name",
 
"required": true
 
},
 
"2": {
 
"label": "Page 2",
 
"description": "The name of the second page to link to",
 
"type": "wiki-page-name"
 
},
 
"3": {
 
"label": "Page 3",
 
"description": "The name of the third page to link to",
 
"type": "wiki-page-name"
 
},
 
"4": {
 
"label": "Page 4",
 
"description": "The name of the fourth page to link to",
 
"type": "wiki-page-name"
 
},
 
"5": {
 
"label": "Page 5",
 
"description": "The name of the fifth page to link to",
 
"type": "wiki-page-name"
 
},
 
"l1": {
 
"label": "Page 1 name",
 
"description": "A name to display instead of the actual name of Page 1",
 
"type": "string"
 
},
 
"l2": {
 
"label": "Page 2 name",
 
"description": "A name to display instead of the actual name of Page 2",
 
"type": "string"
 
},
 
"l3": {
 
"label": "Page 3 name",
 
"description": "A name to display instead of the actual name of Page 3",
 
"type": "string"
 
},
 
"l4": {
 
"label": "Page 4 Name",
 
"description": "A name to display instead of the actual name of Page 4"
 
},
 
"l5": {
 
"label": "Page 5 name",
 
"description": "A name to display instead of the actual name of Page 5",
 
"type": "string"
 
}
 
},
 
"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.",
 
"paramOrder": [
 
"1",
 
"2",
 
"3",
 
"4",
 
"5",
 
"l1",
 
"l2",
 
"l3",
 
"l4",
 
"l5"
 
],
 
"format": "inline"
 
}
 
</templatedata>
 

Revision as of 23:17, 22 February 2019

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
}}

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