<templatestyles src="Module:Hatnote/styles.css"></templatestyles>
This is a documentation subpage for Template:For. It contains usage information, categories and other content that is not part of the original Template page. |
[[Category:Template documentation pages{{#translation:}}]]
This template is used on approximately 173,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
Usage
This template yields a hatnote similar to {{Other uses}}, but allowing more flexible text with links to multiple articles or disambiguation pages. It accepts one or more parameters (zero is not allowed).
With one parameter (rare)
The first parameter sets the hatnote itself and should be plain text. Without any further parameter, it will link to a default disambiguation page for the article title, e.g. <templatestyles src="Template:Nowrap/styles.css"/>{{For|other entities}}
yields on page Foo:
<templatestyles src="Hatnote/styles.css"/>
This kind of usage with exactly one parameter is rare, as in most instances {{Other uses}} (and in this case, {{About}} with the same result) can be used more easily, and without any parameter. But it makes sense in some cases for disambiguation pages with the same type of other meanings, e.g. in Treaty of Lisbon:
<templatestyles src="Hatnote/styles.css"/>
However, for many such cases specific new templates have been implemented, like {{Other people}}, {{Other places}} etc. - see hatnote template overview box below.
With two parameters
The second parameter is used to change the resultant link, e.g. <templatestyles src="Template:Nowrap/styles.css"/>{{For|the acronym|FOO}}
yields (wherever it is set, now independent of the article title):
<templatestyles src="Module:Hatnote/styles.css"></templatestyles>
With more parameters
The third, fourth and fifth parameters are used to give one, two, or three additional resultant links:
<templatestyles src="Module:Hatnote/styles.css"></templatestyles>
<templatestyles src="Module:Hatnote/styles.css"></templatestyles>
<templatestyles src="Module:Hatnote/styles.css"></templatestyles>
the last being produced by e.g. <templatestyles src="Template:Nowrap/styles.css"/>{{For|similar terms|Foobar|Bar|Baz|Quux}}
.
This template supports <templatestyles src="Template:Nowrap/styles.css"/>|selfref=
(see {{self reference}} and MOS:SELFREF for details).
Tracking category
Pages with errors reported by this template are added to Category:Hatnote templates using unusual parameters.
See also
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools.
For
[[Category:TemplateData documentation{{#translation:}}]]
<templatedata> { "description": "This template lists up to four articles on alternative meanings of a term. For further details and examples see the template documentation.", "params": { "1": { "label": "Description", "description": "a phrase describing the major alternative, or a general term for all alternative meanings", "type": "string", "required": true, "example": "other people with the surname Smith" }, "2": { "label": "First link", "description": "A page to link to; usually a disambiguation page or the most likely other meaning.", "default": "For/doc (disambiguation)", "type": "wiki-page-name", "required": false }, "3": { "label": "Second link", "description": "A page to link to for another meaning, if any.", "type": "wiki-page-name", "required": false }, "4": { "label": "Third link", "description": "A page to link to for another meaning, if any.", "type": "wiki-page-name", "required": false }, "5": { "label": "Fourth link", "description": "A page to link to for another meaning, if any.", "type": "wiki-page-name", "required": false } }, "format": "inline" } </templatedata>