Template:For
<templatestyles src="Template:Ombox/styles.css" />
This {{
|Module=Lua module
|#default=template
}} is used on {{#if: 129000+ |129,000+|a very large number of}} pages.
|Module=module |#default=template }} should first be tested in its [[{{
| doc | sandbox = Template:For | #default = Template:For }}/sandbox|/sandbox]] or [[{{
| doc | sandbox = Template:For | #default = Template:For }}/testcases|/testcases]] subpages{{
|Module=. |#default= or in your own user subpage. }} The tested changes can then be added to this page in a single edit. Please consider discussing any changes {{#if:|at [[{{{2}}}]]|on the [[{{
| doc | sandbox = Template talk:For | #default = Template talk:For }}|talk page]]}} before implementing them. |
Uses Lua: |
(The above was produced by: {{{{#if:For|For| tlc|...}}{{#ifeq:the template to create a for loop|the template to create a for loop| |the template to create a for loop | }}{{#ifeq:Template:For loop|Template:For loop| |Template:For loop | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}
.)
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. {{{{#if:For|For| tlc|...}}{{#ifeq:similar terms|similar terms| |similar terms | }}{{#ifeq:x|| |{{{3}}} | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}
yields:
The second parameter is used to change the resultant link, e.g. {{{{#if:For|For| tlc|...}}{{#ifeq:similar terms|similar terms| |similar terms | }}{{#ifeq:Foobar|Foobar| |Foobar | }}{{#ifeq:x|| |{{{4}}} | }}{{#ifeq:x|| |{{{5}}} | }}{{#ifeq:x|| |{{{6}}} | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}
yields:
The third, fourth and fifth parameters are used to give one, two, or three supplementary links:
the last being produced by e.g. {{{{#if:For|For| tlc|...}}{{#ifeq:similar terms|similar terms| |similar terms | }}{{#ifeq:Foobar|Foobar| |Foobar | }}{{#ifeq:Bar|Bar| |Bar | }}{{#ifeq:Baz|Baz| |Baz | }}{{#ifeq:Quux|Quux| |Quux | }}{{#ifeq:x|| |{{{7}}} | }}{{#ifeq:x|| |{{{8}}} | }}{{#ifeq:x|| |{{{9}}} | }}}}
.
TemplateData[edit]
See the monthly error report for this template.
TemplateData for For
}} <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", "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": "For (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>
{{#ifeq:For|sandbox||
}}
The above documentation is transcluded from Template:For/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
{{#if:|
[[Category:Template documentation pages{{#translation:}}]] }}