Template:Main/doc: Difference between revisions

From IxWiki
Jump to navigation Jump to search
mp>Arp242
Shouldn't it be " these topics", instead of "this topic" when adding multiple articles?
 
deprecate Template:Wikipedia template
Line 1: Line 1:
This template is for linking to the main article on a subject (duh).  If an article contains a section about a subject in brief, and RationalWiki happens to have an entire article already devoted to that subject, then this template would be used to direct others to the proper article on the subject.  Its utility differs from casually linking to another article in within the text and from a "See also" section in that it highlights a specific and highly relevant article.
{{Documentation|fromWikipedia=true}}
This template has six parameters.


The first (and required) parameter is simply the name of the article you're linking to. For example, <code><nowiki>{{main|9/11 conspiracy theories}}</nowiki></code> produces  {{main|9/11 conspiracy theories}}
This template is used at the start of a section to link to the main article on that subject.


There is a second, optional parameter which allows you to change the text of the link. For example, <code><nowiki>{{main|9/11 conspiracy theories|What crazy people believe}}</nowiki></code> produces {{main|9/11 conspiracy theories|What crazy people believe}}
==TemplateData==
<templatedata>
{
"description": "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\"",
"params": {
"1": {
"label": "Page 1",
"description": "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. ",
"type": "wiki-page-name",
"required": false,
"suggested": true
},
"2": {
"label": "Page 2",
"description": "The name of the second page that you want to link to.",
"type": "wiki-page-name",
"required": false
},
"3": {
"label": "Page 3",
"description": "The name of the third page that you want to link to. More pages can be added using the parameters \"4\", \"5\", etc.",
"type": "wiki-page-name",
"required": false
},
"l1": {
"type": "string",
"label": "Label 1",
"description": "What the first linked page is to be displayed as.",
"aliases": [
"label 1"
]
},
"l2": {
"label": "Label 2",
"description": "What the second linked page is to be displayed as.",
"type": "string",
"aliases": [
"label 2"
]
},
"l3": {
"label": "Label 3",
"description": "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.",
"type": "string",
"aliases": [
"label 3"
]
},
"selfref": {
"type": "boolean",
"label": "Self reference",
"description": "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."
}
},
"paramOrder": [
"1",
"2",
"3",
"l1",
"l2",
"l3",
"selfref"
],
"format": "{{_|_ = _}}\n"
}
</templatedata>


The third parameter adds a second article, the fourth changes the text of that link; the fifth parameter adds a third article, the sixth changes the text of that link. Or:
<includeonly>[[Category:General wiki templates|{{PAGENAME}}]]</includeonly>
 
<pre>
{{main|1=one|3=two|5=three}}
</pre>
 
Example:
 
{{main|Kirk Cameron|3=Ray Comfort}}
 
{{Template}}
 
<includeonly>
[[Category:In-text templates]]
 
</includeonly>

Revision as of 11:22, 7 June 2023

This template is used at the start of a section to link to the main article on that subject.

TemplateData

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

This template has custom formatting.

ParameterDescriptionTypeStatus
Page 11

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.

Page namesuggested
Page 22

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

Page nameoptional
Page 33

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

Page nameoptional
Label 1l1 label 1

What the first linked page is to be displayed as.

Stringoptional
Label 2l2 label 2

What the second linked page is to be displayed as.

Stringoptional
Label 3l3 label 3

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.

Stringoptional
Self referenceselfref

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.

Booleanoptional