Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  



1.1  0 parameters  





1.2  One or two parameters  



1.2.1  1 Parameter  





1.2.2  2 Parameters  







1.3  3 or more parameters  



1.3.1  Multiple articles per use  





1.3.2  Last parameter  









2 TemplateData  





3 See also  














Template:For-multi/doc: Difference between revisions







Add links
 









Template
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Help
 

From Wikipedia, the free encyclopedia
 

< Template:For-multi

Browse history interactively
 Previous edit
Content deleted Content added
→‎3 or more parameters: 'nother example per talk page
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:

{{Documentation subpage}}

{{Documentation subpage}}

{{High-use}}

<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->

<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->

{{Lua|Module:Hatnote|Module:Hatnote list}}

{{Lua|Module:Hatnote|Module:Hatnote list}}



{{tlx|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 {{tlx|For}} 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 {{tlx|About}} but without the about clause at the start.

{{tlx|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 similarto {{tlx|For}} 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 {{tlx|About}} but without the about clause at the start.



== Usage ==

==Usage==

=== Zero parameters ===

===0 parameters===

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

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



The output with zero parameter {{tlc|For-multi}} is: {{For-multi}}

==== Output and comparison ====

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



'''Comparison to other templates''':

Which is the same as using {{tlx|Other uses}}: {{Other uses}}

This is the same as using {{tlx|Other uses}}: {{Other uses}}



=== One or two parameters ===

===One or two parameters===

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

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



==== Output and comparison ====

====1 Parameter====

The output with one parameter is: {{For multi|UseA}}



This is identical to passing the same arguments to {{tlx|For}}: {{For|UseA}}

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



'''Comparison to other templates''':

The output with two parameters is: {{For multi|UseA|ArticleA}}

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



====2 Parameters====

This is identical to passing the same arguments to {{tlx|For}}: {{For|UseA|ArticleA}}



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

=== Three or more parameters ===

When three or more parameters are provided, this template can be used. Functionally, it is the same as {{tlx|About}}, but without the about clause at the beginning. Per the guideline at [[WP:HNS]], it is up to the editor to decide whether or not the hatnote should contain a brief summary (i.e. whether or not the hatnote should use {{tlx|For multi}} or {{tlx|About}}) based on their preference and what is likely to be clearer and easier for the reader.



'''Comparison to other templates''':

==== Output and comparison ====

The output with three parameter is: {{For multi|UseA|ArticleA|UseB}}

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



===3 or more parameters===

This is different from {{tlx|For}}, where providing three parameters would produce: {{For|UseA|ArticleA|ArticleB}}

When three or more parameters are provided, this template can be used. Functionally, it is the same as {{tlx|About}}, but without the about clause at the beginning. Per the guideline at [[WP:HNS]], it is up to the editor to decide whether or not the hatnote should contain a brief summary (i.e. whether or not the hatnote should use {{tlx|For-multi}} or {{tlx|About}}) based on their preference and what is likely to be clearer and easier for the reader.



With three parameters, the output of

As you can see, this function is able to output multiple uses, unlike {{tlx|For}}. {{tlx|About}} also produces the same output, but with an about clause at the beginning: {{About|About|UseA|Article1|UseB}}

:{{tlx|For-multi|UseA|ArticleA|UseB}}

is: {{For-multi|UseA|ArticleA|UseB}}



With four parameters, the output of

Technically, {{tlx|About}} can be used by passing an empty first parameter, but this isn't recommended as the wikitext <code>{{((}}About||UseA|ArticleA|UseB}}</code> doesn't make it clear what the output is going to be and what the purpose of the template is as, in this case, the name of the template "About" is misleading. Using is this way would look like: {{About||UseA|ArticleA|UseB}}

:{{tlx|For-multi|UseA|ArticleA|UseB|ArticleB}}

is: {{For-multi|UseA|ArticleA|UseB|ArticleB}}



'''Comparison to other templates''':

==== Last parameter ====

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

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



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

The above example produces a link to [[{{FULLPAGENAME}} (disambiguation)]] at the end.



Technically, {{tlx|About}} can be used by passing an empty first parameter, but this isn't recommended as the wikitext <code>{{((}}About||UseA|ArticleA|UseB}}</code> doesn't make it clear what the output is going to be and what the purpose of the template is as, in this case, the name of the template "About" is misleading. Using it this way would look like: {{About||UseA|ArticleA|UseB}}

==== Multiple articles per use ====


Multiple articles can be used per use by putting a parameter with the content <code>and</code> between them. For example the wikitext <code>{{((}}For multi|UseA|ArticleA|and|ArticleB|and|ArticleC|UseB|ArticleD|and|ArticleE}}</code> outputs: {{For multi|UseA|ArticleA|and|ArticleB|and|ArticleC|UseB|ArticleD|and|ArticleE}}

====Multiple articles per use====


Multiple articles can be used per use by putting a parameter with the content <code>and</code> between them. For example, the wikitext <!-- formerly: <code>{{((}}For-multi|UseA|ArticleA|and|ArticleB|and|ArticleC|UseB|ArticleD|and|ArticleE}}</code> -->

:{{tlx|For-multi|UseA|ArticleA|and|ArticleB|and|ArticleC|UseB|ArticleD|and|ArticleE}}

yields: {{For-multi|UseA|ArticleA|and|ArticleB|and|ArticleC|UseB|ArticleD|and|ArticleE}}


====Last parameter====

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

:{{tlx|For-multi|UseA|ArticleA|UseB}}

yields: {{For-multi|UseA|ArticleA|UseB}}


The above example produces a link to the PAGENAME (no namespace) at the end.



== TemplateData ==

== TemplateData ==

Line 55: Line 72:

"label": "Other use 1",

"label": "Other use 1",

"type": "string",

"type": "string",

"description": "What the first other use of the title is. If unused or blank, defaults to \"For other uses\".",

"description": "What the first other use of the title is. If unused or blank, defaults to \"For other uses\" and ignores parameters 3ff.",

"required": true

"required": true

},

},

Line 67: Line 84:

"label": "Other use 2",

"label": "Other use 2",

"type": "string",

"type": "string",

"description": "What the second other use of the title is.",

"description": "What the second other use of the title is. If unused or blank, defaults to \"For other uses\" and ignores parameters 5ff.",

"required": true

"required": true

},

},

Line 73: Line 90:

"label": "Other page 2",

"label": "Other page 2",

"type": "wiki-page-name",

"type": "wiki-page-name",

"description": "The title of the second other page. If unused or blank and parameter 4 exists, defaults to \"[page title] (disambiguation)\"."

"description": "The title of the second other page. If unused or blank and parameter 3 exists, defaults to \"[page title] (disambiguation)\"."

},

},

"5": {

"5": {

"label": "Other use 3",

"label": "Other use 3",

"type": "string",

"type": "string",

"description": "What the third other use of the title is."

"description": "What the third other use of the title is. If unused or blank, defaults to \"For other uses\" and ignores parameters 7ff."

},

},

"6": {

"6": {

"label": "Other page 3",

"label": "Other page 3",

"type": "wiki-page-name",

"type": "wiki-page-name",

"description": "The title of the third other page. If unused or blank and parameter 6 exists, defaults to \"[page title] (disambiguation)\"."

"description": "The title of the third other page. If unused or blank and parameter 5 exists, defaults to \"[page title] (disambiguation)\"."

},

},

"7": {

"7": {

"label": "Other use 4",

"label": "Other use 4",

"type": "string",

"type": "string",

"description": "What the fourth other use of the title is."

"description": "What the fourth other use of the title is. If unused or blank, defaults to \"For other uses\"."

},

},

"8": {

"8": {

"label": "Other page 4",

"label": "Other page 4",

"type": "wiki-page-name",

"type": "wiki-page-name",

"description": "The title of the fourth other page. If unused or blank and parameter 8 exists, defaults to \"[page title] (disambiguation)\"."

"description": "The title of the fourth other page. If unused or blank and parameter 7 exists, defaults to \"[page title] (disambiguation)\"."

}

}

},

},

Line 99: Line 116:

}

}

</templatedata>

</templatedata>


==See also==


* [[:Category:Disambiguation and redirection templates]]

* {{tl|Disambiguation}} – for helping readers find other articles with the same or similar names. Placed at the bottom of the article.

* {{tl|For}} – hatnote linking to multiple articles or disambiguation pages; e.g. ''For similar terms, see ArticleA, ArticleB, and ArticleC.''

* {{tl|Other uses}} – hatnote linking to a disambiguation pages; e.g. ''For other uses, see Target (disambiguation).''

* {{tl|Redirect}} – for linking to disambiguation pages in an article that is [[WP:PRIMARYREDIRECT|the primary topic of a redirect]]

* {{tl|WikiProject Disambiguation}} – for disambig talkpages

* [[Wikipedia:Hatnote]]



{{Hatnote templates}}

{{Hatnote templates}}


<includeonly>{{sandbox other||

<includeonly>{{sandbox other||

<!-- Categories below this line; interwikis at Wikidata -->

<!-- Categories below this line; interwikis at Wikidata -->

[[Category:Disambiguation and redirection templates]]

[[Category:Disambiguation and redirection templates]]

[[Category:Hatnote templates]]

[[Category:Hatnote templates]]


}}</includeonly>

}}</includeonly>


Latest revision as of 17:28, 26 February 2024

{{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 {{For}} 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:

Comparison to other templates:

This is the same as using {{Other uses}}:

One or two parameters[edit]

When one or two parameters are provided, this template functions the exact same as {{For}}. 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:

Comparison to other templates:

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

2 Parameters[edit]

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

Comparison to other templates:

This is identical to passing the same arguments to {{For}}. For example, {{For|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. Per the guideline at WP:HNS, it is up to the editor to decide whether or not the hatnote should contain a brief summary (i.e. whether or not the hatnote should use {{For-multi}}or{{About}}) based on their preference and what is likely to be clearer and easier for the reader.

With three parameters, the output of

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

is:

With four parameters, the output of

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

is:

Comparison to other templates:

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

As you can see, this function is able to output multiple uses, unlike {{For}}. {{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 isn't recommended as the wikitext {{About||UseA|ArticleA|UseB}} doesn't make it clear what the output is going to be and what the purpose of the template is as, 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|and|ArticleE}}

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:

The above example produces a link to the PAGENAME (no namespace) at the end.

TemplateData[edit]

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:For-multi in articles based on its TemplateData.

TemplateData for For-multi

This template lists multiple other uses for the title and links to articles about those uses. See the documentation for more information on usage and alternatives.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Other use 11

What the first other use of the title is. If unused or blank, defaults to "For other uses" and ignores parameters 3ff.

Stringrequired
Other page 12

The title of the first other page. If unused, defaults to "[page title] (disambiguation)".

Page namerequired
Other use 23

What the second other use of the title is. If unused or blank, defaults to "For other uses" and ignores parameters 5ff.

Stringrequired
Other page 24

The title of the second other page. If unused or blank and parameter 3 exists, defaults to "[page title] (disambiguation)".

Page nameoptional
Other use 35

What the third other use of the title is. If unused or blank, defaults to "For other uses" and ignores parameters 7ff.

Stringoptional
Other page 36

The title of the third other page. If unused or blank and parameter 5 exists, defaults to "[page title] (disambiguation)".

Page nameoptional
Other use 47

What the fourth other use of the title is. If unused or blank, defaults to "For other uses".

Stringoptional
Other page 48

The title of the fourth other page. If unused or blank and parameter 7 exists, defaults to "[page title] (disambiguation)".

Page nameoptional

See also[edit]



Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:For-multi/doc&oldid=1210446720"

Hidden category: 
Template documentation pages
 



This page was last edited on 26 February 2024, at 17:28 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki