Difference between revisions of "Template:For/doc"

From blackwiki
Jump to navigation Jump to search
test>Paine Ellsworth
m (update /doc)
imported>Andrybak
 
(32 intermediate revisions by 22 users not shown)
Line 1: Line 1:
 +
{{documentation subpage}}
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
{{high-risk| 129000+ }}
+
{{high-use| 149560 }}
 
{{Lua|Module:For}}
 
{{Lua|Module:For}}
  
Line 6: Line 7:
 
(The above was produced by: {{tlc|For|the template to create a for loop|Template:For loop}}.)
 
(The above was produced by: {{tlc|For|the template to create a for loop|Template:For loop}}.)
  
This template yields a [[WP:HAT|hatnote]] with links to up to four articles or disambiguation pages. It accepts zero to five parameters. If used without parameters on a page named ''Foo'', the result is
+
This template yields a [[WP:Hatnote|hatnote]] with links to up to four articles or disambiguation pages. It accepts zero to five parameters.
{{hatnote|For other uses, see [[:Foo (disambiguation)]].}}
+
The first parameter sets the hatnote itself and should be plain text, e.g. {{tlc|For|similar terms}} yields on page Foo:
The first parameter changes the hatnote itself and should be plain text, e.g. {{tlc|For|similar terms}} yields:
 
 
{{hatnote|For similar terms, see [[:Foo (disambiguation)]].}}
 
{{hatnote|For similar terms, see [[:Foo (disambiguation)]].}}
 
The second parameter is used to change the resultant link, e.g. {{tlc|For|similar terms|Foobar}} yields:
 
The second parameter is used to change the resultant link, e.g. {{tlc|For|similar terms|Foobar}} yields:
Line 17: Line 17:
 
{{For|similar terms|Foobar|Bar|Baz|Quux}}
 
{{For|similar terms|Foobar|Bar|Baz|Quux}}
 
the last being produced by e.g. {{tlc|For|similar terms|Foobar|Bar|Baz|Quux}}.
 
the last being produced by e.g. {{tlc|For|similar terms|Foobar|Bar|Baz|Quux}}.
 +
 +
==Tracking category==
 +
Pages with errors reported by this template are added to [[:Category:Hatnote templates using unusual parameters]].
 +
 +
==See also==
 +
* {{tl|About}}
 +
* {{tl|See also}}
  
 
==TemplateData==
 
==TemplateData==
{{TemplateDataHeader}}
+
{{TemplateData header}}
 
<templatedata>
 
<templatedata>
 
{
 
{
Line 27: Line 34:
 
"label": "Description",
 
"label": "Description",
 
"description": "a phrase describing the major alternative, or a general term for all alternative meanings",
 
"description": "a phrase describing the major alternative, or a general term for all alternative meanings",
"default": "other uses",
 
 
"type": "string",
 
"type": "string",
"required": false,
+
"required": true,
 
"example": "other people with the surname Smith"
 
"example": "other people with the surname Smith"
 
},
 
},
Line 62: Line 68:
 
</templatedata>
 
</templatedata>
 
{{Hatnote templates}}
 
{{Hatnote templates}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
<includeonly>{{Sandbox other||
 
<!-- ADD CATEGORIES BELOW THIS LINE -->
 
<!-- ADD CATEGORIES BELOW THIS LINE -->
 
[[Category:Disambiguation and redirection templates|For]]
 
[[Category:Disambiguation and redirection templates|For]]

Latest revision as of 18:56, 13 January 2021

(The above was produced by: {{For|the template to create a for loop|Template:For loop}}.)

This template yields a hatnote with links to up to four articles or disambiguation pages. It accepts zero to five parameters. The first parameter sets the hatnote itself and should be plain text, e.g. {{For|similar terms}} yields on page Foo:

The second parameter is used to change the resultant link, e.g. {{For|similar terms|Foobar}} yields:

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

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

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; see the monthly parameter usage report for this template.

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)
Pageoptional
Second link3

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

Pageoptional
Third link4

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

Pageoptional
Fourth link5

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

Pageoptional