Template:See also: Difference between revisions

From Campaigns
Jump to navigation Jump to search
m 1 revision imported
mNo edit summary
 
Line 1: Line 1:
<languages/>
<onlyinclude>
<onlyinclude>
{{rellink|extraclasses=mw-tpl-seealso|{{{altphrase|<translate><!--T:1--> See also</translate>}}}: {{#invoke:See also|main<noinclude>|1={{{1}}}</noinclude>|msg-empty-array='''<translate><!--T:2--> Error: [[<tvar|1>Special:MyLanguage/Template:See also</>|Template must be given at least one article name]]</translate>'''}}}}
{{rellink|extraclasses=mw-tpl-seealso|{{{altphrase|See also}}}: {{#invoke:See also|main<noinclude>|1={{{1}}}</noinclude>|msg-empty-array='''Error: [[Template:See also|Template must be given at least one article name]]'''}}}}
</onlyinclude>
</onlyinclude>
{{Documentation|content=
{{Documentation|content=
{{Lua|Module:See also}}
{{(}}{{(}}'''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]]. It is not for use in the "See also" ''section'' at the bottom of an article.


<translate><!--T:5--> <tvar|1>{{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>
* Any number of articles can be listed (at least one should be provided).
<translate><!--T:6--> It is not for use in the "See also" ''section'' at the bottom of an article.</translate>
* The word "and" is always placed between the final two entries.
* You can use parameters label 1, label 2 and so on to specify alternative labels for the links.


{{Tlx|See also|2=<translate><!--T:7--> Article 1</translate>|3=''label 1{{=}}<translate><!--T:22--> label1</translate>''|4=<translate><!--T:24--> Article 2</translate>|5=''label 2{{=}}<translate><!--T:25--> label2</translate>''|6=...}}
==Example==
 
<translate>
<!--T:26-->
* Any number of articles can be listed (at least one should be provided).</translate>
<translate>
<!--T:10-->
* The word "and" is always placed between the final two entries.</translate>
<translate>
<!--T:12-->
* You can use parameters label 1, label 2 and so on to specify alternative labels for the links.</translate>
<translate>
<!--T:27-->
* Parameter <tvar|1><code>ll</code></> makes this template use <tvar|2>{{tl|ll}}</>, which provides automatic linking to translation in user language, as well as using a translated default link text (overriding with <tvar|3><code>label <var>n</var></code></> still applies).
</translate>
:<translate><!--T:13--> adding newline characters will break article links</translate> <!-- presumably because of the leading ":" -->
 
<translate>
==Example== <!--T:14-->
</translate>
{{(}}{{!}} class="wikitable" cellspacing="0" cellpadding="0"
{{(}}{{!}} class="wikitable" cellspacing="0" cellpadding="0"
! <translate><!--T:15--> Code</translate>
!Code
! <translate><!--T:16--> Result</translate>
!Result
{{!}}-
{{!}} valign="top" {{!}} {{Tlx|See also|Article}} {{!}}{{!}} {{See also|Article}}
{{!}}-
{{!}}-
{{!}} valign="top" {{!}} {{Tlx|See also|Article|3=label 1=<translate><!--T:17--> Alternative title for Article</translate>}} {{!}}{{!}} {{See also|Article|label 1=<translate><!--T:18--> Alternative title for Article</translate>}}
{{!}} valign="top" {{!}} <code><nowiki>{{see also|Article}}</nowiki></code> {{!}}{{!}} {{see also|Article}}
{{!}}-
{{!}}-
{{!}} valign="top" {{!}} {{Tlx|See also|Article|Article 2}} {{!}}{{!}} {{See also|Article|Article 2}}
{{!}} valign="top" {{!}} <code><nowiki>{{see also|Article|label 1=Alternative title for Article}}</nowiki></code> {{!}}{{!}} {{see also|Article|label 1=Alternative title for Article}}
{{!}}-
{{!}}-
{{!}} valign="top" {{!}} {{Tlx|See also|Article|Article 2|Article 3}} {{!}}{{!}} {{See also|Article|Article 2|Article 3}}
{{!}} valign="top" {{!}} <code><nowiki>{{see also|Article|Article 2}}</nowiki></code> {{!}}{{!}} {{see also|Article|Article 2}}
{{!}}-
{{!}}-
{{!}} valign="top" {{!}} {{Tlx|See also|Article|Article 2|<nowiki>ll=TRUE</nowiki>}} {{!}}{{!}} {{See also|Article|Article 2|ll=TRUE|l1=Article translated|l2=Article 2 translated}}
{{!}} valign="top" {{!}} <code><nowiki>{{see also|Article|Article 2|Article 3}}</nowiki></code> {{!}}{{!}} {{see also|Article|Article 2|Article 3}}
{{!}}-
{{!}}-
{{!}} valign="top" {{!}} {{Tlx|See also|Article|Article 2|4=l2=<translate><!--T:19--> Alternative title for Article 2</translate>}} {{!}}{{!}} {{See also|Article|Article 2|l2=<translate><!--T:20--> Alternative title for Article 2</translate>}}
{{!}} valign="top" {{!}} <code><nowiki>{{see also|Article|Article 2|l2=Alternative title for Article 2}}</nowiki></code> {{!}}{{!}} {{see also|Article|Article 2|l2=Alternative title for Article 2}}
{{!}}{{)}}
{{!}}{{)}}


Line 49: Line 28:


}}
}}
[[Category:Templates{{#translation:}}]]
[[Category:Templates]]

Latest revision as of 17:36, 20 May 2022

See also: [[:{{{1}}}]]
Template documentation

{{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. It is not for use in the "See also" section at the bottom of an article.

  • Any number of articles can be listed (at least one should be provided).
  • The word "and" is always placed between the final two entries.
  • You can use parameters label 1, label 2 and so on to specify alternative labels for the links.

Example

Code Result
{{see also|Article}}
See also: Article
{{see also|Article|label 1=Alternative title for Article}}
{{see also|Article|Article 2}}
See also: Article and Article 2
{{see also|Article|Article 2|Article 3}}
See also: Article, Article 2 and Article 3
{{see also|Article|Article 2|l2=Alternative title for Article 2}}


Display a note about a related page.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page name1

Full name of related page

Page namerequired
Link labellabel 1 l1

Custom label for the link, instead of the page name.

Default
Page name
Stringoptional
Page 22

no description

Page nameoptional
Label 2label 2 l2

no description

Templateoptional
Page 33

no description

Page nameoptional
Label 3label 3 l3

no description

Stringoptional
use {{ll}}ll

If this parameter has any non-blank value, links are generated using {{ll}}, which provides automatic linking to translation in user language, as well as using a translated default link text (overriding link texts still applies).

Lineoptional

[[Category:Hatnote templates{{#translation:}}]]