Template:Main/doc

From Second Life Wiki
Jump to navigation Jump to search
Error: This page is not currently protected. Please request protection or remove the protection template.

exclamation mark

Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum.
Please discuss proposed changes on the talk page first.
Editing a template causes all pages that use the template to be re-rendered. If the Template is used often, this can put a lot of load on the servers since it fills up the job queue. [statistics]
This template is for linking to main content. For the mainspace detection template, see template:main other.

When a "Wikipedia logo"Wikipedia article is large, it is often written in "Wikipedia logo"summary style. This "Wikipedia logo"template is used after the heading of the summary, to link to the subtopic article that has been summarized. For "Wikipedia logo"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}} link in the lead section would be the article itself, which is not useful. {{Broader}} may be appropriate in this case.

Usage

See: "Wikipedia logo"WP:SUMMARYHATNOTE

  • Basic usage: {{Main|page}}
  • All parameters: {{Main|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 "Wikipedia logo"namespace prefix). Categories and files are automatically escaped with the "Wikipedia logo"colon trick, and links to sections are automatically formatted as page § section, rather than the MediaWiki default of page#section.
  • l1, l2, l3, ... orlabel 1, label 2, label 3, ... – 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 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.

Template data

This is the "Wikipedia logo"TemplateData for this template used by TemplateWizard, "Wikipedia logo"VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.

TemplateData for Main

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

Examples

Underscores (_) between words are not necessary

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}}, for example.

See also

  • {{Main list}}: For a more comprehensive list, see Article.
  • {{Broader}}: For broader coverage of this topic, see Article.
  • {{Excerpt}}, which allows transclusion of text (such as an intro section) from one article into another
  • {{Further}}: Further information: Article.
  • {{Official website}}