Difference between revisions of "Template:Main/Documentation"
(Added template data so template can (hopefully, if I did this right) be used directly from the visual editor) |
Colok76286 (talk | contribs) (→Examples: Edits) |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{docpage}} | {{docpage}} | ||
− | This template is used for formatting links to more | + | 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"}} | ||
+ | |||
+ | The template can only link up to 5 pages. If you need to link more than 5 pages, use a second template as follows: | ||
+ | <pre>{{main|Article 1|Article 2|Article 3|Article 4|Article 5}}</pre> | ||
+ | <pre>{{main|Article 6|Article 7}}</pre> | ||
== Examples == | == Examples == | ||
Line 30: | Line 36: | ||
| {{Main|Aviation|Ground vehicles|Fleet}} | | {{Main|Aviation|Ground vehicles|Fleet}} | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
− | | <pre>{{Main|Aviation|Ground vehicles|Fleet|l1= | + | | <pre>{{Main|Aviation|Ground vehicles|Fleet|l1=Air|l2=Ground|l3=Navy}}</pre> |
− | | {{Main|Aviation|Ground vehicles|Fleet|l1= | + | | {{Main|Aviation|Ground vehicles|Fleet|l1=Air|l2=Ground|l3=Navy}} |
|} | |} | ||
+ | |||
+ | {{sp-begin|TemplateData}} | ||
<templatedata> | <templatedata> | ||
{ | { | ||
Line 87: | Line 95: | ||
} | } | ||
}, | }, | ||
− | "description": "This template is used for formatting links to more | + | "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 111: | ||
} | } | ||
</templatedata> | </templatedata> | ||
+ | {{sp-end}} |
Latest revision as of 08:26, 14 October 2022
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 }}
Note: The character 'l' in "l1" is a lowercase 'L', NOT a capital "i" or a "1" |
The template can only link up to 5 pages. If you need to link more than 5 pages, use a second template as follows:
{{main|Article 1|Article 2|Article 3|Article 4|Article 5}}
{{main|Article 6|Article 7}}
Examples
Code | Result |
---|---|
{{Main|Aviation}} |
|
{{Main|Aviation|Ground vehicles|Fleet}} |
|
{{Main|Aviation|Ground vehicles|Fleet|l1=Air|l2=Ground|l3=Navy}} |
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page 1 | 1 | The name of the first page to link to
| Page | required |
Page 2 | 2 | The name of the second page to link to
| Page | optional |
Page 3 | 3 | The name of the third page to link to
| Page | optional |
Page 4 | 4 | The name of the fourth page to link to
| Page | optional |
Page 5 | 5 | The name of the fifth page to link to
| Page | optional |
Page 1 name | l1 | A name to display instead of the actual name of Page 1
| String | optional |
Page 2 name | l2 | A name to display instead of the actual name of Page 2
| String | optional |
Page 3 name | l3 | A name to display instead of the actual name of Page 3
| String | optional |
Page 4 Name | l4 | A name to display instead of the actual name of Page 4
| Unknown | optional |
Page 5 name | l5 | A name to display instead of the actual name of Page 5
| String | optional |