Template:Main article
Template data
TemplateData for Main article
This template links a section of one page to the main page describing the section topic. The template will display, in italics, "Main article: Page 1, Page 2 and Page 3"
Parameter | Description | Type | Status | |
---|---|---|---|---|
Page name | 1 page_name page1 page page_name1 page1_name | The page to link to | Page name | required |
Page 2 name | 2 page2_name page2 page_name2 page2_name | The second page to link to | Page name | optional |
Page 3 name | 3 page3_name page3 page_name3 page3_name | The third page to link to | Page name | optional |
Page 4 name | 4 page4_name page4 page_name4 page4_name | The fouth page to link to | Page name | optional |
Title 1 | l1 label1 label name title title1 name1 | What the first linked page is to be displayed as. | String | optional |
Title 2 | l2 label2 title2 name2 | What the 2nd linked page is to be displayed as. | String | optional |
Title 3 | l3 label3 title3 name3 | What the 3rd linked page is to be displayed as. | String | optional |
Title 4 | l4 label4 title4 name4 | What the 4th linked page is to be displayed as. | String | optional |
Add selfref css class | selfref | Set to "yes" if the template is a self-reference to MEpedia using a class called selfref. | Boolean | optional |
Usage
- Basic usage:
{{Main article |page1}}
- All parameters:
{{Main article |page1 |page2 |page3 |page4 |l1=title1 |l2=title2 |l3=title3 |l4=title4 }}
- All parameters:
{{Main article |page1 |page2 |page3 |page4 |l1=title1 |l2=title2 |l3=title3 |l4=title4 }}
Parameters
1
,2
,3
, ... – the pages to link to. If no page names are specified, the current page name is used instead.
Categories and files are automatically escaped with the colon trick. Links to sections are automatically formatted as page § section, rather than the MediaWiki default of page#section.
l1
,l2
,l3
, ... ortitle1
,title2
,title3
, ... – 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
, notL1
.selfref
– if set to "yes", "y", "true" or "1", adds the CSS class "selfref".
This is used to denote self-references so is not set on MEpedia.
Examples
{{Main article}}
→
{{Main article|Definitions of myalgic encephalomyelitis and chronic fatigue syndrome}}
→
{{Main article|Pain#Nerve pain}}
→
{{Main article|Pain#Nerve pain|l1=Custom section label}}
→
{{Main article|Pain|Hyperalgesia|Allodynia}}
→
{{Main article|Pain|l1=Custom label 1|Hyperalgesia|l2=Custom label 2}}
→
{{Main article|Analgesic|l1={{mp|Pain medication|1}}}}
→
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 the case for {{see also}}
{{see also}}, for example.
See also
- {{See also}}
{{See also}}
The above documentation is transcluded from Template:Main article/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | no description | Unknown | optional |