Jump to content

Template:See also: Difference between revisions

Replace over-engineered template.
m (Remove internationalization.)
(Replace over-engineered template.)
Line 1: Line 1:
<includeonly><onlyinclude>''See also: [[{{{1}}}|{{{l1|{{{1}}}}}}]]{{#if:{{{2|}}}|{{#if:{{{3|}}}|,|{{space}}and}} [[{{{2}}}|{{{l2|{{{2}}}}}}]]{{#if:{{{3|}}}|, and [[{{{3}}}|{{{l3|{{{3}}}}}}]]}}}}''</onlyinclude></includeonly>


<onlyinclude>
<templatedata>
{{rellink|extraclasses=mw-tpl-seealso|{{{altphrase|<!--T:1--> See also}}}{{msgnw:int:colon-separator/{{#invoke:Caller title|lang|base=Template:See also}}}}{{#invoke:See also|main<noinclude>|1={{{1}}}</noinclude>|msg-empty-array='''<!--T:2--> Error: [[<tvar name=1>Special:MyLanguage/Template:See also</tvar>|Template must be given at least one article name]]'''}}}}
{
</onlyinclude>
"params": {
{{Documentation|content=
"1": {
{{Lua|Module:See also}}
"label": "Link 1",
 
"example": "May Then My Name",
<!--T:5--> <tvar name=1>{{tlx|See also}}</tvar> 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]].
"type": "wiki-page-name",
<!--T:6--> It is not for use in the "See also" ''section'' at the bottom of an article.
"required": true
 
},
{{Tlx|See also|2=<!--T:7--> Article 1|3=''label 1{{=}}<!--T:22--> label1''|4=<!--T:24--> Article 2|5=''label 2{{=}}<!--T:25--> label2''|6=...}}
"2": {
 
"label": "Link 2",
 
"example": "True Name",
<!--T:26-->
"type": "wiki-page-name"
* Any number of articles can be listed (at least one should be provided).
},
 
"3": {
<!--T:10-->
"label": "Link 3",
* The word "and" is always placed between the final two entries.
"example": "A Finger Pointing",
 
"type": "wiki-page-name"
<!--T:12-->
},
* You can use parameters label 1, label 2 and so on to specify alternative labels for the links.
"l1": {
 
"label": "Label 1",
<!--T:27-->
"type": "line",
* Parameter <tvar name=1><code>ll</code></tvar> makes this template use <tvar name=2>{{tl|ll}}</tvar>, which provides automatic linking to translation in user language, as well as using a translated default link text (overriding with <tvar name=3><code>label <var>n</var></code></tvar> still applies).
"suggestedvalues": [
 
"May"
:<!--T:13--> adding newline characters will break article links <!-- presumably because of the leading ":" -->
]
 
},
 
"l2": {
==Example== <!--T:14-->
"label": "Label 2",
 
"type": "line"
{{(}}{{!}} class="wikitable" cellspacing="0" cellpadding="0"
},
! <!--T:15--> Code
"l3": {
! <!--T:16--> Result
"label": "Label 3",
{{!}}-
"type": "line"
{{!}} valign="top" {{!}} {{Tlx|See also|Article}} {{!}}{{!}} {{See also|Article}}
}
{{!}}-
},
{{!}} valign="top" {{!}} {{Tlx|See also|Article|3=label 1=<!--T:17--> Alternative title for Article}} {{!}}{{!}} {{See also|Article|label 1=<!--T:18--> Alternative title for Article}}
"paramOrder": [
{{!}}-
"1",
{{!}} valign="top" {{!}} {{Tlx|See also|Article|Article 2}} {{!}}{{!}} {{See also|Article|Article 2}}
"l1",
{{!}}-
"2",
{{!}} valign="top" {{!}} {{Tlx|See also|Article|Article 2|Article 3}} {{!}}{{!}} {{See also|Article|Article 2|Article 3}}
"l2",
{{!}}-
"3",
{{!}} 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}}
"l3"
{{!}}-
]
{{!}} valign="top" {{!}} {{Tlx|See also|Article|Article 2|4=l2=<!--T:19--> Alternative title for Article 2}} {{!}}{{!}} {{See also|Article|Article 2|l2=<!--T:20--> Alternative title for Article 2}}
}
{{!}}{{)}}
</templatedata>
 
{{See also/doc}}
 
}}
[[Category:Templates{{#translation:}}]]