Template:Main article

From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
Revision as of 21:44, August 9, 2018 by Bill (talk | contribs) (u)
template icon Template documentation[view] [edit] [history] [purge]

Template data

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 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"

Template parameters

ParameterDescriptionTypeStatus
Page name1 page_name page1 page page_name1 page1_name

The page to link to

Page namerequired
Page 2 name2 page2_name page2 page_name2 page2_name

The second page to link to

Page nameoptional
Page 3 name3 page3_name page3 page_name3 page3_name

The third page to link to

Page nameoptional
Page 4 name4 page4_name page4 page_name4 page4_name

The fouth page to link to

Page nameoptional
Title 1l1 label1 label name title title1 name1

What the first linked page is to be displayed as.

Stringoptional
Title 2l2 label2 title2 name2

What the 2nd linked page is to be displayed as.

Stringoptional
Title 3l3 label3 title3 name3

What the 3rd linked page is to be displayed as.

Stringoptional
Title 4l4 label4 title4 name4

What the 4th linked page is to be displayed as.

Stringoptional
Add selfref css classselfref

Set to "yes" if the template is a self-reference to MEpedia using a class called selfref.

Booleanoptional

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, not L1.
  • 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

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}}

No description.

Template parameters

ParameterDescriptionTypeStatus
11

no description

Unknownoptional