Difference between revisions of "Template:See also"

From RobotX
Jump to navigation Jump to search
m (Text replacement - "</>" to "")
m (Text replacement - "</translate>" to "")
Line 1: Line 1:
 
<languages/>
 
<languages/>
<onlyinclude>{{#switch:<translate></translate>
+
<onlyinclude>{{#switch:<translate>
 
| =
 
| =
{{rellink|extraclasses=mw-tpl-seealso|{{{altphrase|<translate><!--T:1--> See also</translate>}}}: {{#if:{{{1<includeonly>|</includeonly>}}} |<!--then:-->[[:{{{1}}}{{#if:{{{label 1|{{{l1|}}}}}}|{{!}}{{{label 1|{{{l1}}}}}}}}]] |<!--else:-->'''<translate><!--T:2--> Error: [[Special:MyLanguage/Template:See also|Template must be given at least one article name]]</translate>'''
+
{{rellink|extraclasses=mw-tpl-seealso|{{{altphrase|<translate><!--T:1--> See also}}}: {{#if:{{{1<includeonly>|</includeonly>}}} |<!--then:-->[[:{{{1}}}{{#if:{{{label 1|{{{l1|}}}}}}|{{!}}{{{label 1|{{{l1}}}}}}}}]] |<!--else:-->'''<translate><!--T:2--> Error: [[Special:MyLanguage/Template:See also|Template must be given at least one article name]]'''
 
}}{{#if:{{{2|}}}|{{#if:{{{3|}}}|{{int|comma-separator}}|<nowiki/>{{int|and}}{{int|word-separator}}}} [[:{{{2}}}{{#if:{{{label 2|{{{l2|}}}}}}|{{!}}{{{label 2|{{{l2}}}}}}}}]]
 
}}{{#if:{{{2|}}}|{{#if:{{{3|}}}|{{int|comma-separator}}|<nowiki/>{{int|and}}{{int|word-separator}}}} [[:{{{2}}}{{#if:{{{label 2|{{{l2|}}}}}}|{{!}}{{{label 2|{{{l2}}}}}}}}]]
 
}}{{#if:{{{3|}}}|{{#if:{{{4|}}}|{{int|comma-separator}}|<nowiki/>{{int|and}}{{int|word-separator}}}} [[:{{{3}}}{{#if:{{{label 3|{{{l3|}}}}}}|{{!}}{{{label 3|{{{l3}}}}}}}}]]
 
}}{{#if:{{{3|}}}|{{#if:{{{4|}}}|{{int|comma-separator}}|<nowiki/>{{int|and}}{{int|word-separator}}}} [[:{{{3}}}{{#if:{{{label 3|{{{l3|}}}}}}|{{!}}{{{label 3|{{{l3}}}}}}}}]]
Line 17: Line 17:
 
}}{{#if:{{{14|}}}|{{#if:{{{15|}}}|{{int|comma-separator}}|<nowiki/>{{int|and}}{{int|word-separator}}}} [[:{{{14}}}{{#if:{{{label 14|{{{l14|}}}}}}|{{!}}{{{label 14|{{{l14}}}}}}}}]]
 
}}{{#if:{{{14|}}}|{{#if:{{{15|}}}|{{int|comma-separator}}|<nowiki/>{{int|and}}{{int|word-separator}}}} [[:{{{14}}}{{#if:{{{label 14|{{{l14|}}}}}}|{{!}}{{{label 14|{{{l14}}}}}}}}]]
 
}}{{#if:{{{15|}}}|{{int|and}}{{int|word-separator}}[[:{{{15}}}{{#if:{{{label 15|{{{l15|}}} }}}|{{!}}{{{label 15|{{{l15|}}} }}} }}]]
 
}}{{#if:{{{15|}}}|{{int|and}}{{int|word-separator}}[[:{{{15}}}{{#if:{{{label 15|{{{l15|}}} }}}|{{!}}{{{label 15|{{{l15|}}} }}} }}]]
}}{{#if:{{{16|}}}| &mdash; '''<br/><translate><!--T:3--> Error: [[Special:MyLanguage/Template:See also|Too many links specified (maximum is 15)]]</translate>'''
+
}}{{#if:{{{16|}}}| &mdash; '''<br/><translate><!--T:3--> Error: [[Special:MyLanguage/Template:See also|Too many links specified (maximum is 15)]]'''
 
}}}}
 
}}}}
 
| #default=
 
| #default=
Line 28: Line 28:
  
 
<!--T:5-->
 
<!--T:5-->
{{tlx|See also}} is used to create [[w:Wikipedia:Hatnote|hatnotes]] to point to a small number of other, related, titles at the '''top''' of [[w:Help:Section|article sections]] according to [[w:Wikipedia:Layout|Wikipedia:Layout]].</translate>
+
{{tlx|See also}} is used to create [[w:Wikipedia:Hatnote|hatnotes]] to point to a small number of other, related, titles at the '''top''' of [[w:Help:Section|article sections]] according to [[w:Wikipedia:Layout|Wikipedia:Layout]].
 
<translate>
 
<translate>
 
<!--T:6-->
 
<!--T:6-->
 
It is not for use in the "See also" ''section'' at the bottom of an article.
 
It is not for use in the "See also" ''section'' at the bottom of an article.
</translate>
 
  
  {{Tlx|See also|<translate><!--T:7--> Article 1</translate>|...|''<translate><!--T:8--> Article 15</translate>''}}
+
 
 +
  {{Tlx|See also|<translate><!--T:7--> Article 1|...|''<translate><!--T:8--> Article 15''}}
  
 
<translate>
 
<translate>
 
<!--T:9-->
 
<!--T:9-->
* One to fifteen articles can be listed.</translate>
+
* One to fifteen articles can be listed.
 
<translate>
 
<translate>
 
<!--T:10-->
 
<!--T:10-->
* The word "and" is always placed between the final two entries.</translate>
+
* The word "and" is always placed between the final two entries.
 
<translate>
 
<translate>
 
<!--T:11-->
 
<!--T:11-->
* If more than 15 entries are supplied, a message will be displayed pointing out the problem.</translate><!-- this is relatively ungraceful failure -->
+
* If more than 15 entries are supplied, a message will be displayed pointing out the problem.<!-- this is relatively ungraceful failure -->
 
<translate>
 
<translate>
 
<!--T:12-->
 
<!--T:12-->
 
* You can use parameters label 1 to label 15 to specify alternative labels for the links.
 
* You can use parameters label 1 to label 15 to specify alternative labels for the links.
</translate>
+
 
:<translate><!--T:13--> adding newline characters will break article links</translate> <!-- presumably because of the leading ":" -->
+
:<translate><!--T:13--> adding newline characters will break article links <!-- presumably because of the leading ":" -->
  
 
<translate>
 
<translate>
 
==Example== <!--T:14-->
 
==Example== <!--T:14-->
</translate>
+
 
 
<table class="wikitable" cellspacing="0" cellpadding="0">
 
<table class="wikitable" cellspacing="0" cellpadding="0">
 
<tr>
 
<tr>
<th><translate><!--T:15--> Code</translate></th>
+
<th><translate><!--T:15--> Code</th>
<th><translate><!--T:16--> Result</translate></th>
+
<th><translate><!--T:16--> Result</th>
 
</tr><tr>
 
</tr><tr>
 
<td valign="top">{{Tlx|See also|Article}}</td><td>{{See also|Article}}</td>
 
<td valign="top">{{Tlx|See also|Article}}</td><td>{{See also|Article}}</td>
 
</tr><tr>
 
</tr><tr>
<td valign="top">{{Tlx|See also|Article|3=label 1=<translate><!--T:17--> Alternative title for Article</translate>}}</td><td>{{See also|Article|label 1=<translate><!--T:18--> Alternative title for Article</translate>}}</td>
+
<td valign="top">{{Tlx|See also|Article|3=label 1=<translate><!--T:17--> Alternative title for Article}}</td><td>{{See also|Article|label 1=<translate><!--T:18--> Alternative title for Article}}</td>
 
</tr><tr>
 
</tr><tr>
 
<td valign="top">{{Tlx|See also|Article|Article 2}}</td><td>{{See also|Article|Article 2}}</td>
 
<td valign="top">{{Tlx|See also|Article|Article 2}}</td><td>{{See also|Article|Article 2}}</td>
Line 67: Line 67:
 
<td valign="top">{{Tlx|See also|Article|Article 2|Article 3}}</td><td>{{See also|Article|Article 2|Article 3}}</td>
 
<td valign="top">{{Tlx|See also|Article|Article 2|Article 3}}</td><td>{{See also|Article|Article 2|Article 3}}</td>
 
</tr><tr>
 
</tr><tr>
<td valign="top">{{Tlx|See also|Article|Article 2|4=label 2=<translate><!--T:19--> Alternative title for Article 2</translate>}}</td><td>{{See also|Article|Article 2|label 2=<translate><!--T:20--> Alternative title for Article 2</translate>}}
+
<td valign="top">{{Tlx|See also|Article|Article 2|4=label 2=<translate><!--T:19--> Alternative title for Article 2}}</td><td>{{See also|Article|Article 2|label 2=<translate><!--T:20--> Alternative title for Article 2}}
 
</tr>
 
</tr>
 
</table>
 
</table>
''<translate><!--T:21--> And so on up to 15 parameters.</translate>''
+
''<translate><!--T:21--> And so on up to 15 parameters.''
  
 
{{See also/doc}}
 
{{See also/doc}}

Revision as of 20:46, 21 December 2019

Template documentation

<translate>

Usage

{{See also}} is used to create hatnotes to point to a small number of other, related, titles at the top of article sections according to Wikipedia:Layout. <translate> It is not for use in the "See also" section at the bottom of an article.


{{See also|<translate> Article 1|...|<translate> Article 15}}

<translate>

  • One to fifteen articles can be listed.

<translate>

  • The word "and" is always placed between the final two entries.

<translate>

  • If more than 15 entries are supplied, a message will be displayed pointing out the problem.

<translate>

  • You can use parameters label 1 to label 15 to specify alternative labels for the links.
<translate> adding newline characters will break article links

<translate>

Example

<translate> Code <translate> Result
{{See also|Article}}
{{See also|Article|label 1=<translate> Alternative title for Article}}
{{See also|Article|Article 2}}
{{See also|Article|Article 2|Article 3}}
{{See also|Article|Article 2|label 2=<translate> Alternative title for Article 2}}

<translate> And so on up to 15 parameters.

Display a note about a related page.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page name1

Full name of related page

Pagerequired