Template:Main/doc: Difference between revisions
m (1 revision imported) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Lua|icononly=on|Module:Main}} | {{Lua|icononly=on|Module:Main}} | ||
When | When an article is large, it is often written in summary style. This template is used after the heading of the summary, to link to the sub-article that has been summarized. For [[w:Help:Category|Category namespace]], please use '''{{tl|Cat main}}''' instead. | ||
Use of this template should be restricted to the purposes described above. It is '''not''' to be used as a substitute for inline links or {{tl|Further}} template. The latter is used when the section expounds a specific aspect of the topic instead of summarizing its article | Use of this template should be restricted to the purposes described above. It is '''not''' to be used as a substitute for inline links or {{tl|Further}} template. The latter is used when the section expounds a specific aspect of the topic instead of summarizing its article. | ||
{{TOC limit}} | {{TOC limit}} | ||
Line 13: | Line 13: | ||
== Parameters == | == Parameters == | ||
* <code>1</code>, <code>2</code>, <code>3</code>, ... - the pages to link to. If no page names are specified, the current page name is used instead (without the | * <code>1</code>, <code>2</code>, <code>3</code>, ... - the pages to link to. If no page names are specified, the current page name is used instead (without the namespace prefix). Categories and files are automatically escaped with the [[w:Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''. | ||
* <code>l1</code>, <code>l2</code>, <code>l3</code>, ...; optional labels for each of the pages to link to (this is for articles where a piped link would be used). Note that the extra parameters use a lower case 'L', for example, <code>l1</code>, <u>not</u> <code>11</code>. | * <code>l1</code>, <code>l2</code>, <code>l3</code>, ...; optional labels for each of the pages to link to (this is for articles where a piped link would be used). Note that the extra parameters use a lower case 'L', for example, <code>l1</code>, <u>not</u> <code>11</code>. | ||
== Examples == | == Examples == |
Latest revision as of 07:07, 11 July 2016
Uses Lua: |
When an article is large, it is often written in summary style. This template is used after the heading of the summary, to link to the sub-article that has been summarized. For Category namespace, please use {{Cat main}} instead.
Use of this template should be restricted to the purposes described above. It is not to be used as a substitute for inline links or {{Further}} template. The latter is used when the section expounds a specific aspect of the topic instead of summarizing its article.
Usage[edit]
- Basic usage
- {{main|page}}
- All parameters
- {{main | page1 | page2 | page3 | ... | l1 = label1 | l2 = label2 | l3 = label3 | ... | selfref = yes}}
Parameters[edit]
1
,2
,3
, ... - the pages to link to. If no page names are specified, the current page name is used instead (without the namespace prefix). Categories and files are automatically escaped with the colon trick, and links to sections are automatically formatted as page § section, rather than the MediaWiki default of page#section.l1
,l2
,l3
, ...; optional labels for each of the pages to link to (this is for articles where a piped link would be used). Note that the extra parameters use a lower case 'L', for example,l1
, not11
.
Examples[edit]
{{main|Article}}
→Main article: Article{{main|Article#Section}}
→Main article: Article § Section{{main|Article#Section|l1=Custom section label}}
→Main article: Custom section label{{main|Article1|Article2|Article3}}
→{{main|Article1|l1=Custom label 1|Article2|l2=Custom label 2}}
→Main articles: Custom label 1 and Custom label 2{{main|(15760) 1992 QB1|l1={{mp|(15760) 1992 QB|1}}}}
→Main article: (15760) 1992 QB1
TemplateData | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
This is the TemplateData documentation for this template used by VisualEditor and other tools.
TemplateData for Main This template is used after the heading of a section, to link to a sub-article (or sub-articles) that is entirely about the topic of the section. The template will display, in italics, "Main article: Article 1, Article 2 and Article 3"
|