Difference between revisions of "Template:Main/doc"

m (1 revision imported)
 
 
Line 1: Line 1:
 
{{Lua|icononly=on|Module:Main}}
 
{{Lua|icononly=on|Module:Main}}
  
When a [[Wikipedia:What is an article|Wikipedia article]] is large, it is often written in [[Wikipedia:summary style|summary style]]. This [[Wikipedia:Template messages|template]] is used after the heading of the summary, to link to the sub-article that has been summarized. For [[Help:Category|Category namespace]], please use '''{{tl|Cat main}}''' instead.
+
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. For example, in [[phthalate]], the template under the "Endocrine disruptor" section should '''not''' be {{tlf|Main|Endocrine disruptor}}, because the section specifically deals with phthalate as an endocrine disruptor and not endocrine disruptors in general.
+
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 [[WP:NS|namespace]] prefix). Categories and files are automatically escaped with the [[Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''.
+
* <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>.
* <code>selfref</code> - if set to "yes", "y", "true" or "1", adds the CSS class "selfref". This is used to denote self-references to Wikipedia. See [[Template:Selfref]] for more information. This is only necessary in articles and other content (e.g. templates) that will appear in articles, and need not be added for uses of this template on <code>Wikipedia:</code> namespace pages.
 
  
 
== Examples ==
 
== Examples ==

Latest revision as of 23:07, 10 July 2016

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, not 11.

Examples[edit]