Difference between revisions of "Template:For/doc"
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.", |
| − | + | "params": { | |
| − | + | "1": { | |
| − | + | "label": "Description", | |
| − | + | "description": "a phrase describing the major alternative, or a general term for all alternative meanings", | |
| − | + | "default": "other uses", | |
| − | + | "type": "string", | |
| − | + | "required": false, | |
| − | + | "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", | |
| − | }}</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
| 40px | This template is used on 158,000+ pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. Transclusion count updated automatically (see documentation). |
| This template uses Lua: |
(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
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 | optional |
| First link | 2 | A page to link to; usually a disambiguation page or the most likely other meaning.
| Page | optional |
| Second link | 3 | A page to link to for another meaning, if any. | Page | optional |
| Third link | 4 | A page to link to for another meaning, if any. | Page | optional |
| Fourth link | 5 | A page to link to for another meaning, if any. | Page | optional |