Misplaced Pages

Template:For: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 16:26, 29 October 2006 view source160.39.226.205 (talk)No edit summary← Previous edit Latest revision as of 12:58, 17 July 2021 view source Plastikspork (talk | contribs)Edit filter managers, Administrators259,055 edits Misplaced Pages:Templates for discussion/Log/2021 July 8#Template:For closed as do not merge (XFDcloser)Tag: Manual revert 
(36 intermediate revisions by 22 users not shown)
Line 1: Line 1:
<includeonly>{{#invoke:For|For}}</includeonly><noinclude>
:<span class="dablink">''For {{{1}}}, see ]{{if:{{{3|}}}|&#32;and ]}}.''</span>
{{Documentation}}

<noinclude>
]
</noinclude> </noinclude>

Latest revision as of 12:58, 17 July 2021

Template documentation[view] [edit] [history] [purge] For the template to create a for loop, see Template:For loop.
WarningThis template is used on approximately 193,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. {{For|other entities}} yields on page Foo:

For other entities, see Foo (disambiguation).

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:

For earlier treaties known as Treaty of Lisbon, see Treaty of Lisbon (disambiguation).

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. {{For|the acronym|FOO}} yields (wherever it is set, now independent of the article title):

For the acronym, see FOO.

With more parameters

The third, fourth and fifth parameters are used to give one, two, or three additional resultant links:

For similar terms, see Foobar and Bar. For similar terms, see Foobar, Bar, and Baz. For similar terms, see Foobar, Bar, Baz, and Quux.

the last being produced by e.g. {{For|similar terms|Foobar|Bar|Baz|Quux}}.

The |selfref=yes option marks the entire hatnote as a Misplaced Pages self-reference, causing it to be omitted when the page content is reused outside of Misplaced Pages (see {{self reference}} and MOS:SELFREF for more details).

Styling in italics

Please see Misplaced Pages:Hatnote § Hatnotes with italics in the links (WP:ITHAT) for details about how to use italics in hatnotes.

Tracking category

Pages with errors reported by this template are added to Category:Hatnote templates using unusual parameters.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:For in articles based on its TemplateData.

TemplateData for For

This template lists up to four articles on alternative meanings of a term. For further details and examples see the template documentation.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Description1

a phrase describing the major alternative, or a general term for all alternative meanings

Example
other people with the surname Smith
Stringrequired
First link2

A page to link to; usually a disambiguation page or the most likely other meaning.

Default
{{PAGENAME}} (disambiguation)
Page nameoptional
Second link3

A page to link to for another meaning, if any.

Page nameoptional
Third link4

A page to link to for another meaning, if any.

Page nameoptional
Fourth link5

A page to link to for another meaning, if any.

Page nameoptional
Is self-reference?selfref

Set to yes to make this hatnote invisible on e.g. printed versions, for ]s

Default
no
Auto value
yes
Booleanoptional
Hatnote templates
Generic
For and about
Other topics
Redirect
Distinguish
For use in sections
Special
Subject specific
The above documentation is transcluded from Template:For/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template. Category: