Permanently protected template

Template:Main article

From Wikipedia, the free encyclopedia
  (Redirected from Template:Main)
Jump to: navigation, search
Main article: Main article
Template documentation[view] [edit] [history] [purge]

When a Wikipedia article is large, it is often written in summary style. This template is used after the heading of the summary, to link to the subtopic 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. For example, in phthalate, the template under the "Endocrine disruptor" section should not be {{Main|Endocrine disruptor}}, because the section specifically deals with phthalate as an endocrine disruptor and not endocrine disruptors in general.

This template should also not be used in lead sections. A lead section is always a summary of its own article, not any other; as such, the only appropriate target for a {{main article}} link in the lead section would be the article itself, which is not useful. {{Broader}} may be appropriate in this case.

Usage

Basic usage
{{main article|page}}
All parameters
{{main article | page1 | page2 | page3 | ... | l1 = label1 | l2 = label2 | l3 = label3 | ... | selfref = yes}}

Parameters

  • 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 L1. (label 1, label 2, label 3, ... for this template does not work)
  • selfref - 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 Wikipedia: namespace pages.

Examples

Errors

If the name of the first page that you want to link to is not specified, the current page name (with no namespace prefix) is used instead:

No errors can be displayed due to the illegal usage of parameters or other usages (i.e. the first parameter can be omitted, other parameters can be used even if the first one is empty (and automatically filled with the current page name (with no namespace prefix)), equals sign can be used as one of the parameters, and template can be used by direct call to the module (using "#invoke")). This is not case for {{see also}}, for example.

TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools.

See the monthly error report for this template.

TemplateData for Main article

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"

Template parameters

Parameter Description Type Status
Page 1 1

The name of the first page that you want to link to. If this is not specified, the current page name (with no namespace prefix) is used instead.

Default
empty
Example
empty
Auto value
empty
Line suggested
Page 2 2

The name of the second page that you want to link to.

Default
empty
Example
empty
Auto value
empty
Line optional
Page 3 3

The name of the third page that you want to link to. More pages can be added using the parameters "4", "5", "6", etc.

Default
empty
Example
empty
Auto value
empty
Line optional
Label 1 l1

What the first linked page is to be displayed as.

Default
empty
Example
empty
Auto value
empty
Line optional
Label 2 l2

What the second linked page is to be displayed as.

Default
empty
Example
empty
Auto value
empty
Line optional
Label 3 l3

What the third linked page is to be displayed as. Other labels can be added by using increasing numbers (starting with "l4" for page 4) as parameter names.

Default
empty
Example
empty
Auto value
empty
Line optional
Self reference selfref

Set to "yes" if the template is a self-reference to Wikipedia that would not make sense on mirrors or forks of the Wikipedia site.

Default
empty
Example
empty
Auto value
empty
Line optional
https://en.wikipedia.org/wiki/Template:Main
en.wikipedia.org
crawl=CC-MAIN-2017-04
77484
application/http; msgtype=response
sha1:LQPWB6SF23HTARDSOTLOIEM45MYPOZS6
<urn:uuid:c1ba4828-8fc1-49e2-b7f0-7aae50bd72d4>
2017-01-16T18:13:21Z
208.80.154.224
sha1:XPEQETIUYFKYPOBQJEDLSWUJ4POF3SVH
<urn:uuid:2a86e0f2-32f9-4907-b70b-be9d6c32346a>
https://en.wikipedia.org/wiki/Template:Main
response
<urn:uuid:9ff9af14-e1e2-4e6d-826b-1b8a73c42dce>
robots: classic
hostname: ip-10-171-10-70.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2017-04
operator: CommonCrawl Admin
description: Wide crawl of the web for January 2017
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf