Difference between revisions of "Template:For/doc"

From blackwiki
Jump to navigation Jump to search
test>GermanJoe
m (+tweak for VE)
imported>Andrybak
 
(49 intermediate revisions by 35 users not shown)
Line 1: Line 1:
 +
{{documentation subpage}}
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 +
{{high-use| 149560 }}
 +
{{Lua|Module:For}}
 +
 
{{for|the template to create a for loop|Template:For loop}}
 
{{for|the template to create a for loop|Template:For loop}}
<templatedata>{
+
(The above was produced by: {{tlc|For|the template to create a for loop|Template:For loop}}.)
"description": "This template lists up to four articles on alternative meanings of a term. For further details and examples see the template documentation.",
+
 
"params": {
+
This template yields a [[WP:Hatnote|hatnote]] with links to up to four articles or disambiguation pages. It accepts zero to five parameters.
  "1": {
+
The first parameter sets the hatnote itself and should be plain text, e.g. {{tlc|For|similar terms}} yields on page Foo:
    "label": "topic",
+
{{hatnote|For similar terms, see [[:Foo (disambiguation)]].}}
    "description": "usually describing the major alternative or a general term for all alternative meanings",
+
The second parameter is used to change the resultant link, e.g. {{tlc|For|similar terms|Foobar}} yields:
    "default": "other uses",
+
{{For|similar terms|Foobar}}
    "type": "string",
+
The third, fourth and fifth parameters are used to give one, two, or three supplementary links:
    "required": false
+
{{For|similar terms|Foobar|Bar}}
  },
+
{{For|similar terms|Foobar|Bar|Baz}}
  "2": {
+
{{For|similar terms|Foobar|Bar|Baz|Quux}}
    "label": "major alternative",
+
the last being produced by e.g. {{tlc|For|similar terms|Foobar|Bar|Baz|Quux}}.
    "description": "usually a disambiguation page or the most likely alternative meaning",
+
 
    "default": "{{PAGENAME}} (disambiguation)",
+
==Tracking category==
    "type": "string/wiki-page-name",
+
Pages with errors reported by this template are added to [[:Category:Hatnote templates using unusual parameters]].
    "required": false
+
 
  },
+
==See also==
  "3": {
+
* {{tl|About}}
    "label": "first minor alternative",
+
* {{tl|See also}}
    "description": "another meaning if any",
 
    "type": "string/wiki-page-name",
 
    "required": false
 
  },
 
  "4": {
 
    "label": "second minor alternative",
 
    "description": "another meaning if any",
 
    "type": "string/wiki-page-name",
 
    "required": false
 
  },
 
  "5": {
 
    "label": "third minor alternative",
 
    "description": "another meaning if any",
 
    "type": "string/wiki-page-name",
 
    "required": false
 
  }
 
}}</templatedata>
 
{{Hatnote templates documentation}}
 
  
<includeonly>
+
==TemplateData==
 +
{{TemplateData header}}
 +
<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": "{{PAGENAME}} (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>
 +
{{Hatnote templates}}
 +
<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]]
 
[[Category:Hatnote templates]]
 
[[Category:Hatnote templates]]
  
<!-- ADD INTERWIKIS BELOW THIS LINE -->
+
}}</includeonly>
</includeonly>
 

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