Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Search
Editing
Template:Main article/doc
From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
Namespaces
Template
Discussion
More
More
Page actions
Read
Edit source
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Template data== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "Page name", "aliases": [ "page_name", "page1", "page", "page_name1", "page1_name" ], "description": "The page to link to", "type": "wiki-page-name", "required": true }, "l1": { "type": "string", "label": "Title 1", "description": "What the first linked page is to be displayed as.", "aliases": [ "label1", "label", "name", "title", "title1", "name1" ] }, "2": { "label": "Page 2 name", "aliases": [ "page2_name", "page2", "page_name2", "page2_name" ], "description": "The second page to link to", "type": "wiki-page-name", "required": false }, "l2": { "type": "string", "label": "Title 2", "description": "What the 2nd linked page is to be displayed as.", "aliases": [ "label2", "title2", "name2" ] }, "3": { "label": "Page 3 name", "aliases": [ "page3_name", "page3", "page_name3", "page3_name" ], "description": "The third page to link to", "type": "wiki-page-name", "required": false }, "l3": { "type": "string", "label": "Title 3", "description": "What the 3rd linked page is to be displayed as.", "aliases": [ "label3", "title3", "name3" ] }, "4": { "label": "Page 4 name", "aliases": [ "page4_name", "page4", "page_name4", "page4_name" ], "description": "The fouth page to link to", "type": "wiki-page-name", "required": false }, "l4": { "type": "string", "label": "Title 4", "description": "What the 4th linked page is to be displayed as.", "aliases": [ "label4", "title4", "name4" ] }, "selfref": { "type": "boolean", "label": "Add selfref css class", "description": "Set to \"yes\" if the template is a self-reference to MEpedia using a class called selfref." } }, "paramOrder": [ "1", "2", "3", "4", "l1", "l2", "l3", "l4", "selfref" ], "description": "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\"" } </templatedata> ==Usage== * '''Basic usage:'''<br> :<code><nowiki>{{Main article |page1}}</nowiki></code> * '''All parameters:'''<br> <pre>{{Main article |page1 |page2 |page3 |page4 |l1=title1 |l2=title2 |l3=title3 |l4=title4 }} </pre> * '''All parameters:'''<br> :<code><nowiki>{{Main article |page1 |page2 |page3 |page4 |l1=title1 |l2=title2 |l3=title3 |l4=title4 }}</nowiki></code> ==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. 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''. *<code>l1</code>, <code>l2</code>, <code>l3</code>, ... ''or''<code>title1</code>, <code>title2</code>, <code>title3</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>L1</code>. *<code>selfref</code> β 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== *<code><nowiki>{{Main article}}</nowiki></code> → {{main article|category=no}} *<code><nowiki>{{Main article|Definitions of myalgic encephalomyelitis and chronic fatigue syndrome}}</nowiki></code> → {{main article|Definitions of myalgic encephalomyelitis and chronic fatigue syndrome}} *<code><nowiki>{{Main article|Pain#Nerve pain}}</nowiki></code> → {{main article|Pain#Nerve pain}} *<code><nowiki>{{Main article|Pain#Nerve pain|l1=Custom section label}}</nowiki></code> → {{main article|Pain#Nerve pain|l1=Custom section label}} *<code><nowiki>{{Main article|Pain|Hyperalgesia|Allodynia}}</nowiki></code> → {{main article|Pain|Hyperalgesia|Allodynia}} *<code><nowiki>{{Main article|Pain|l1=Custom label 1|Hyperalgesia|l2=Custom label 2}}</nowiki></code> → {{main article|Pain|l1=Custom label 1|Hyperalgesia|l2=Custom label 2}} *<code><nowiki>{{Main article|Analgesic|l1={{mp|Pain medication|1}}}}</nowiki></code> → {{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: *{{Main article|category=no}} 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 {{tl|see also}}, for example. ==See also== *{{tl|See also}} {{Hatnote templates}} [[Category:Translated templates]]
Summary:
Please make sure your edits are consistent with
MEpedia's guidelines
.
By saving changes, you agree to the
Terms of use
, and you irrevocably agree to release your contribution under the
CC BY-SA 3.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Colon
(
edit
)
Template:GetFallback
(
edit
)
Template:Hatnote templates
(
edit
)
Template:LangSwitch
(
edit
)
Template:Main article
(
edit
)
Template:Navbox
(
edit
)
Template:TemplateData header
(
edit
)
Template:Template error report
(
view source
) (protected)
Template:Tl
(
edit
)
Template:Uselang
(
edit
)
Template:Yesno
(
edit
)
Template:Yesno-no
(
edit
)
Module:Arguments
(
edit
)
Module:Navbar
(
edit
)
Module:Navbox
(
edit
)
Navigation
Navigation
Skip to content
Main page
Browse
Become an editor
Random page
Popular pages
Abbreviations
Glossary
About MEpedia
Links for editors
Contents
Guidelines
Recent changes
Pages in need
Search
Help
Wiki tools
Wiki tools
Special pages
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs