Template:For/doc

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Script error: No such module "For". Script error: No such module "Message box". Script error: No such module "High-use". Template:Lua

This template produces a hatnote similar to Template:Tl, but allowing more flexible text with links to multiple articles or disambiguation pages.

Usage

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. Template:Tlc yields on page Foo: Script error: No such module "Hatnote".

This kind of usage with exactly one parameter is rare, as in most instances Template:Tl (and in this case, Template:Tl 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: Script error: No such module "Hatnote". However, for many such cases specific new templates have been implemented, like Template:Tl, Template:Tl etc. see the hatnote template overview box below.

With two parameters

The second parameter is used to change the resultant link, e.g. Template:Tlc yields (wherever it is set, now independent of the article title): Script error: No such module "For".

With more parameters

The third, fourth and fifth parameters are used to give one, two, or three additional resultant links: Script error: No such module "For". Script error: No such module "For". Script error: No such module "For". the last being produced by e.g. Template:Tlc.

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

Styling in italics

Please see Template:Section link (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

Template:TemplateData header

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 in certain versions, e.g. when printed.

Default
no
Auto value
yes
Booleanoptional

Template:Hatnote templates