Template:For/doc: Difference between revisions
(Created page with " ") |
No edit summary |
||
| Line 1: | Line 1: | ||
{{for|the template to create a for loop|Template:For loop}} | |||
{{documentation subpage}} | |||
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> | |||
{{Lua|Module:For}} | |||
This template produces a hatnote on an article or other page similar to {{tl|Other uses}}, but allowing more flexible text with links to multiple articles or disambiguation pages. | |||
== Usage == | |||
It accepts one or more parameters (zero is not allowed). | |||
=== With one parameter (rare) === | |||
The first parameter sets the hatnote itself and should be plain text. Without any further parameter, it will link to a default disambiguation page for the article title, e.g. {{tlc|For|other entities}} yields on page Foo: | |||
{{hatnote|For other entities, see [[:Foo (disambiguation)]].}} | |||
This kind of usage with exactly one parameter is rare, as in most instances {{tl|Other uses}} (and in this case, {{tl|About}} with the same result) can be used more easily, and without any parameter. But it makes sense in some cases for disambiguation pages with the same type of other meanings, e.g., in [[Treaty of Lisbon]]: | |||
{{hatnote|For other uses of "Loa", see [[Loa (disambiguation)]].}} | |||
However, for many such cases specific new templates have been implemented, like {{tl|Other people}}, {{tl|Other places}} etc. see the hatnote template overview box below. | |||
=== With two parameters === | |||
The second parameter is used to change the resultant link, e.g., {{tlc|For|the acronym|FOO}} yields (wherever it is set, now independent of the article title): | |||
{{For|the acronym|FOO}} | |||
=== With more parameters === | |||
The third, fourth and fifth parameters are used to give one, two, or three additional resultant links: | |||
{{For|similar terms|Foobar|Bar}} | |||
{{For|similar terms|Foobar|Bar|Baz}} | |||
{{For|similar terms|Foobar|Bar|Baz|Quux}} | |||
For instance, the last note is produced by {{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]]. | |||
{{Hatnote templates}} | |||
<includeonly>{{Sandbox other|| | |||
<!-- ADD CATEGORIES BELOW THIS LINE --> | |||
[[Category:Disambiguation and redirection hatnote templates]] | |||
[[Category:Variadic templates]] | |||
}}</includeonly> | |||
Latest revision as of 15:19, 15 May 2026
| This is a documentation subpage for Template:For. It may contain usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
This template produces a hatnote on an article or other page similar to {{Other uses}}, but allowing more flexible text with links to multiple articles or disambiguation pages.
Usage
It accepts one or more parameters (zero is not allowed).
With one parameter (rare)
The first parameter sets the hatnote itself and should be plain text. Without any further parameter, it will link to a default disambiguation page for the article title, e.g. {{For|other entities}} yields on page Foo:
This kind of usage with exactly one parameter is rare, as in most instances {{Other uses}} (and in this case, {{About}} with the same result) can be used more easily, and without any parameter. But it makes sense in some cases for disambiguation pages with the same type of other meanings, e.g., in Treaty of Lisbon:
However, for many such cases specific new templates have been implemented, like {{Other people}}, {{Other places}} etc. see the hatnote template overview box below.
With two parameters
The second parameter is used to change the resultant link, e.g., {{For|the acronym|FOO}} yields (wherever it is set, now independent of the article title):
With more parameters
The third, fourth and fifth parameters are used to give one, two, or three additional resultant links:
For instance, the last note is produced by {{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.