Difference between revisions of "Template:For/doc"

From blackwiki
Jump to navigation Jump to search
test>Timothy Gu
(Update page count)
test>GKFX
(Improve TemplateData.)
Line 20: Line 20:
 
==TemplateData==
 
==TemplateData==
 
{{TemplateDataHeader}}
 
{{TemplateDataHeader}}
<templatedata>{
+
<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": {
+
"description": "This template lists up to four articles on alternative meanings of a term. For further details and examples see the template documentation.",
  "1": {
+
"params": {
    "label": "topic",
+
"1": {
    "description": "usually describing the major alternative or a general term for all alternative meanings",
+
"label": "Description",
    "default": "other uses",
+
"description": "a phrase describing the major alternative, or a general term for all alternative meanings",
    "type": "string",
+
"default": "other uses",
    "required": false
+
"type": "string",
  },
+
"required": false,
  "2": {
+
"example": "other people with the surname Smith"
    "label": "major alternative",
+
},
    "description": "usually a disambiguation page or the most likely alternative meaning",
+
"2": {
    "default": "{{PAGENAME}} (disambiguation)",
+
"label": "First link",
    "type": "string/wiki-page-name",
+
"description": "A page to link to; usually a disambiguation page or the most likely other meaning.",
    "required": false
+
"default": "{{PAGENAME}} (disambiguation)",
  },
+
"type": "wiki-page-name",
  "3": {
+
"required": false
    "label": "first minor alternative",
+
},
    "description": "another meaning if any",
+
"3": {
    "type": "string/wiki-page-name",
+
"label": "Second link",
    "required": false
+
"description": "A page to link to for another meaning, if any.",
  },
+
"type": "wiki-page-name",
  "4": {
+
"required": false
    "label": "second minor alternative",
+
},
    "description": "another meaning if any",
+
"4": {
    "type": "string/wiki-page-name",
+
"label": "Third link",
    "required": false
+
"description": "A page to link to for another meaning, if any.",
  },
+
"type": "wiki-page-name",
  "5": {
+
"required": false
    "label": "third minor alternative",
+
},
    "description": "another meaning if any",
+
"5": {
    "type": "string/wiki-page-name",
+
"label": "Fourth link",
    "required": false
+
"description": "A page to link to for another meaning, if any.",
  }
+
"type": "wiki-page-name",
}}</templatedata>
+
"required": false
 +
}
 +
},
 +
"format": "inline"
 +
}
 +
</templatedata>
 
{{Hatnote templates}}
 
{{Hatnote templates}}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||

Revision as of 22:23, 5 June 2017

(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. If used without parameters on a page named Foo, the result is

The first parameter changes the hatnote itself and should be plain text, e.g. {{For|similar terms}} yields:

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}}.

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

Default
other uses
Example
other people with the surname Smith
Stringoptional
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