Template:For multi/doc

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

{{For multi}} is a commonly used hatnote template on Wikipedia, recently imported to Commons. It should be placed at the top of an page, linking the reader to other pages with similar titles or concepts that they may have been seeking instead.


This template is meant as a version of {{For2}} for cases of multiple specific uses. It works similarly to {{About}}, but without the leading "about".
{{For multi}} is a hatnote template that produces a list of alternative uses for the title of the article and links to articles about those uses. It is similar to {{For2}} with the primary difference being this template allows multiple uses to be listed while still being able to link to multiple articles per use. It is essentially the same as {{About}} but without the "about" clause at the start.

Usage

[edit]

0 parameters

[edit]

When no parameters are provided, this template functions the exact same as {{Other uses}}. It is preferred to use that template as it more clearly explains the output of the function.

The output with zero parameter {{For multi}} is:

1 or 2 parameters

[edit]

When one or two parameters are provided, this template functions the exact same as {{For2}}. It is preferred to use that template as the "multi" functionality of this template is not required.

1 Parameter

[edit]

With one parameter, {{For multi|UseA}} yields:

This is identical to passing the same arguments to {{For2}}. For example, {{For2|UseA}} yields:

2 Parameters

[edit]

With two parameters, {{For multi|UseA|ArticleA}} yields:

This is identical to passing the same arguments to {{For2}}. For example, {{For2|UseA|ArticleA}} yields:

3 or more parameters

[edit]

When three or more parameters are provided, this template can be used. Functionally, it is the same as {{About}}, but without the about clause at the beginning.

With three parameters, the output of

{{For multi|UseA|ArticleA|UseB}}

is:

The output of {{For multi|UseA|ArticleA|UseB}} is different from {{For2}} provided with three parameters where {{For2|UseA|ArticleA|ArticleB}} yields:

With four parameters, the output of

{{For multi|UseA|ArticleA|UseB|ArticleB}}

is:

As one can see, this function is able to output multiple uses, unlike {{For2}}. {{About}} also produces the same output, but with an "about" clause at the beginning. For example, {{About|About|UseA|ArticleA|UseB}} yields:

Technically, {{About}} can be used by passing an empty first parameter, but this is not recommended as the wikitext {{((}}About||UseA|ArticleA|UseB}} does not clarify what the output will be and what the purpose of the template is since, in this case, the name of the template "About" is misleading. Using it this way would look like:

Multiple articles per use

[edit]

Multiple articles can be used per use by putting a parameter with the content and between them. For example, the wikitext

{{For multi|UseA|ArticleA|and|ArticleB|and|ArticleC|UseB|ArticleD|...}}

yields:

Last parameter

[edit]

When the last parameter is a "use", the current article plus (disambiguation) will be linked to at the end of the template. For example,

{{For multi|UseA|ArticleA|UseB}}

yields:

This also works if the last parameter is simply "other uses":

{{For multi|UseA|ArticleA|UseB|ArticleB|other uses}}

which yields:

Both of the above examples produce a link to Template:For multi/doc (disambiguation) at the end.

See also

[edit]

Templates linking contents

[edit]

"1-N" means from one to many.

Upwards links
Downwards links
Sideways page links
Sideways category links
Interproject links