Template:For: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 3: | Line 3: | ||
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|more on Whereabouts Lane|this St. Crispian's}}</nowiki></code> produces: | 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|more on Whereabouts Lane|this St. Crispian's}}</nowiki></code> produces: | ||
{{for|St. Crispian's|more on Whereabouts Lane | {{for|St. Crispian's|more on Whereabouts Lane}} | ||
{{for|St. Crispian's}} | {{for|St. Crispian's}} | ||
| Line 12: | Line 12: | ||
== Usage Examples == | == Usage Examples == | ||
:* '''Note:''' The examples below show each parameter separated by a line break. A simple space on either side of the vertical bar (<code>|</code>) will also work. The line breaks are an aid for demonstration purposes. | |||
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable" | {| style="width: 100%; text-align: left; margin: auto;" class="wikitable" | ||
|- class="title" | |- class="title" | ||
! style="width: 10%;" | Parameter !! style="width: 25%;" | Code !! style="width: 65%;" | | ! style="width: 10%;" | Parameter !! style="width: 25%;" | Code !! style="width: 65%;" | Output | ||
|- | |- | ||
| rowspan="2" style="text-align: center;" | '''1''' | | rowspan="2" style="text-align: center;" | '''1''' | ||
| colspan="2" style="text-align: center;" | When | | 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}} | | <pre>{{for|St. Crispian's}}</pre> || style="text-align: center;" | {{for|St. Crispian's}} | ||
|- | |||
! colspan="3" | | |||
|- | |- | ||
| rowspan="2" style="text-align: center;" | '''2''' | | rowspan="2" style="text-align: center;" | '''2''' | ||
| colspan="2" style="text-align: center;" | | | 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 | | <pre>{{for | ||
|St. Crispian's | |St. Crispian's | ||
| | |details on Whereabouts Lane | ||
}}</pre> || style="text-align: center;" | {{for|St. Crispian's|details on Whereabouts Lane}} | |||
}}</pre> || style="text-align: center;" | {{for|St. Crispian's| | |||
|- | |- | ||
| rowspan="2" style="text-align: center;" | '''3''' | | rowspan="2" style="text-align: center;" | '''3''' | ||
| colspan="2" style="text-align: center;" | | | colspan="2" style="text-align: center;" | When a third unnamed parameter is passed, it will replace the linked text. | ||
|- | |- | ||
| <pre>{{for|St. Crispian's| | | <pre>{{for | ||
|St. Crispian's#History | |||
|the history of St. Crispian's | |||
|this page}}</pre> || style="text-align: center;" | {{for|St. Crispian's#History|the history of St. Crispian's|this page}} | |||
|- | |- | ||
| rowspan="2" style="text-align: center;" | <code>pre=</code> | | rowspan="2" style="text-align: center;" | <code>pre=</code> | ||
| Line 45: | Line 50: | ||
| <pre>{{for|St. Crispian's|more on Whereabouts Lane|St. Crispian's}}</pre> || style="text-align: center;" | {{for|St. Crispian's|more on Whereabouts Lane|St. Crispian's}} | | <pre>{{for|St. Crispian's|more on Whereabouts Lane|St. Crispian's}}</pre> || style="text-align: center;" | {{for|St. Crispian's|more on Whereabouts Lane|St. Crispian's}} | ||
|- | |- | ||
| rowspan="2" style="text-align: center;" | ''' | | rowspan="2" style="text-align: center;" | '''All''' | ||
| colspan="2" style="text-align: center;" | This is a test of a span description. | | colspan="2" style="text-align: center;" | This is a test of a span description. | ||
|- | |- | ||
Revision as of 21:09, 19 March 2025
This template should be used when the need arises to provide a link on a similar or related topic. This is also to help prevent confusion when articles have similar names by providing a manual re-direct link.
It generally takes one unnamed parameter, {{{1}}}, as input. By default, it returns "For more information, see {{{1}}}", where {{{1}}} 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, {{for|St. Crispian's|more on Whereabouts Lane|this St. Crispian's}} produces:
The template is intended to be brief, but additional optional parameters |pre= and |post= allow you to add additional explanatory text at the beginning or end of the displayed text, if necessary. For example, {{for|Emma M. Lion#Family|Emma M. Lion the first|pre="Emma M. Lion" redirects here}} produces:
Usage Examples
- Note: The examples below show each parameter separated by a line break. A simple space on either side of the vertical bar (
|) will also work. The line breaks are an aid for demonstration purposes.
- Note: The examples below show each parameter separated by a line break. A simple space on either side of the 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
|this page}} |
||
pre=
|
This is a test of a span description. | |
{{for|St. Crispian's|more on Whereabouts Lane|St. Crispian's}} |
||
post=
|
This is a test of a span description. | |
{{for|St. Crispian's|more on Whereabouts Lane|St. Crispian's}} |
||
| All | This is a test of a span description. | |
{{for|St. Crispian's|more on Whereabouts Lane|St. Crispian's}} |
||
Articles Using Template
- The Unselected Journals of Emma M. Lion: Volume 1 (transclusion) (← links | edit)
- Lapis Lazuli (transclusion) (← links | edit)
- The St. Crispian's Gazette (transclusion) (← links | edit)