Template:For/doc
This is a documentation subpage for Template:For (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
Usage[edit]
This template yields a hatnote, 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)[edit]
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:
This kind of usage with exactly one parameter is rare. But it makes sense in some cases for disambiguation pages with the same type of other meanings.
With two parameters[edit]
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):
Lua error in Module:Hatnote_list at line 44: attempt to call field 'formatPages' (a nil value).
With more parameters[edit]
The third, fourth and fifth parameters are used to give one, two, or three additional resultant links:
Lua error in Module:Hatnote_list at line 44: attempt to call field 'formatPages' (a nil value).
Lua error in Module:Hatnote_list at line 44: attempt to call field 'formatPages' (a nil value).
Lua error in Module:Hatnote_list at line 44: attempt to call field 'formatPages' (a nil value).
the last being produced by e.g. {{For|similar terms|Foobar|Bar|Baz|Quux}}
.
The |selfref=yes
option marks the entire hatnote as a Festipedia self-reference, causing it to be omitted when the page content is reused outside of Festipedia.
Tracking category[edit]
Pages with errors reported by this template are added to Category:Hatnote templates using unusual parameters.
TemplateData[edit]
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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Description | 1 | a phrase describing the major alternative, or a general term for all alternative meanings
| String | required |
First link | 2 | A page to link to; usually a disambiguation page or the most likely other meaning.
| Page name | optional |
Second link | 3 | A page to link to for another meaning, if any. | Page name | optional |
Third link | 4 | A page to link to for another meaning, if any. | Page name | optional |
Fourth link | 5 | A page to link to for another meaning, if any. | Page name | optional |
Is self-reference? | selfref | Set to yes to make this hatnote invisible on e.g. printed versions, for self references
| Boolean | optional |