Template:For: Difference between revisions

From The Reed and Rite
mNo edit summary
m Protected "Template:For" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div class=navaid>{{#if:{{{pre|}}}|{{{pre}}}.&nbsp;}}''For {{{2|more information}}}, see [[{{{1}}}|{{{3|{{{1}}}|}}}]].{{#if:{{{post|}}}|&nbsp;{{{post}}}|}}''</div></includeonly><noinclude>
<includeonly><div class=navigation>{{#if:{{{pre|}}}|{{{pre}}}.&nbsp;}}''For {{{2|more information}}}, see [[{{{1}}}|{{{3|{{{1}}}|}}}]].{{#if:{{{post|}}}|&nbsp;{{{post}}}|}}''</div></includeonly><noinclude>
== Description ==
This template should be used when the need arises to provide a link to a similar or related topic. This is also to help prevent confusion when articles have similar names by providing a manual re-direct link.


Use this template when you have a ''similar'' topic that should be prominently linked to another article, either for more information or to avoid confusion between similarly-named articles.
== Usage ==
:* '''Note:''' The examples below show each parameter separated by a line break for demonstration purposes only. For use in articles, please separate parameters with only a vertical bar (<code>|</code>).
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable"
|- class="title"
! style="width: 10%;" | Parameter !! style="width: 25%;" | Code !! style="width: 65%;" | Output
|-
| rowspan="2" style="text-align: center;" | '''1'''
! colspan="2" style="text-align: center;" | When one unnamed parameter is passed, the template will provide a link to the page defined; preceded by the text: "''For more information,''".
|-
| <pre>{{for |St. Crispian's }}</pre> || style="text-align: center;" | {{for|St. Crispian's}}
|-
| rowspan="2" style="text-align: center;" | '''2'''
! colspan="2" style="text-align: center;" | When a second unnamed parameter is passed, it will replace the text "more information" in the output.
|-
| <pre>{{for
|St. Crispian's
|details on Whereabouts Lane
}}</pre> || style="text-align: center;" | {{for|St. Crispian's|details on Whereabouts Lane}}
|-
| rowspan="2" style="text-align: center;" | '''3'''
! colspan="2" style="text-align: center;" | When a third unnamed parameter is passed, it will replace the linked text.
|-
| <pre>{{for
|St. Crispian's#History
|the history of St. Crispian's
|History}}</pre> || style="text-align: center;" | {{for|St. Crispian's#History|the history of St. Crispian's|History}}
|-
| rowspan="2" style="text-align: center;" | <code>pre=</code>
! colspan="2" style="text-align: center;" | When the named parameter <code>pre=TEXT</code> is passed, additional text is added at the beginning of the output.
|-
| <pre>{{for
|Lapis Lazuli#Lapis Lazuli Minor
|more on Lapis Lazuli Minor
|here
|pre=This page is on Lapis Lazuli House}}</pre> || style="text-align: center;" | {{for |Lapis Lazuli#Lapis Lazuli Minor |more on Lapis Lazuli Minor|here| pre=This page is on Lapis Lazuli House}}
|-
| rowspan="2" style="text-align: center;" | <code>post=</code>
! colspan="2" style="text-align: center;" | When the named parameter <code>post=TEXT</code> is passed, additional text is added at the end of the output.
|-
| <pre>{{for
|Lapis Lazuli#Lapis Lazuli Minor
|more on Lapis Lazuli Minor
|here
|post=This page is dedicated to Lapis Lazuli House}}</pre> || style="text-align: center;" | {{for |Lapis Lazuli#Lapis Lazuli Minor |more on Lapis Lazuli Minor|here| post=This page is dedicated to Lapis Lazuli House}}
|}


It generally takes one unnamed parameter, <code>{{{1}}}</code>, as input. By default, it returns "For more information, see <code>{{{1}}}</code>", where <code>{{{1}}}</code> is a link to the referenced article. A second unnamed parameter will replace "more information" and a third will replace the text which refers to the linked article. For example, <code><nowiki>{{for|St._Crispian's|oodles of information|this page about the cosmere}}</nowiki></code> produces:
== Articles Using Template ==
: {{for|St. Crispian's|oodles of information|this page about the cosmere}}
<div class="navigation">This list is limited to 100 articles. For a full listing see [[Special: WhatLinksHere/{{FULLPAGENAME}}|here]].</div>
 
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}
The template is intended to be brief, but additional optional parameters <code>|pre=</code> and <code>|post=</code> allow you to add additional explanatory text at the beginning or end of the displayed text, if necessary. For example, <code><nowiki>{{for|Wulfden the First|the first Wyrn named Wulfden|pre='Wulfden' redirects here}}</nowiki></code> produces:
: {{for|Wulfden the First|the first Wyrn named Wulfden|pre='Wulfden' redirects here}}
 
[[Category:Navigation Aids]]
[[Category:Templates]]


== Articles using Template ==
[[Category:Navigation]]
<div class="navaid">This list is limited to 100 articles. For a full listing see [[Special: WhatLinksHere/{{FULLPAGENAME}}|here]].</div>
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}

Latest revision as of 18:10, 21 April 2025

Description

This template should be used when the need arises to provide a link to a similar or related topic. This is also to help prevent confusion when articles have similar names by providing a manual re-direct link.

Usage

  • Note: The examples below show each parameter separated by a line break for demonstration purposes only. For use in articles, please separate parameters with only a vertical bar (|).
Parameter Code Output
1 When one unnamed parameter is passed, the template will provide a link to the page defined; preceded by the text: "For more information,".
{{for |St. Crispian's }}
2 When a second unnamed parameter is passed, it will replace the text "more information" in the output.
{{for
|St. Crispian's
|details on Whereabouts Lane
}}
3 When a third unnamed parameter is passed, it will replace the linked text.
{{for
|St. Crispian's#History
|the history of St. Crispian's
|History}}
pre= When the named parameter pre=TEXT is passed, additional text is added at the beginning of the output.
{{for
|Lapis Lazuli#Lapis Lazuli Minor
|more on Lapis Lazuli Minor
|here
|pre=This page is on Lapis Lazuli House}}
post= When the named parameter post=TEXT is passed, additional text is added at the end of the output.
{{for
|Lapis Lazuli#Lapis Lazuli Minor
|more on Lapis Lazuli Minor
|here
|post=This page is dedicated to Lapis Lazuli House}}

Articles Using Template