Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:See also/doc: Difference between revisions

Template page
No edit summary
m 1 revision imported
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{documentation subpage}}
{{Documentation subpage}}
{{used in system|in [[MediaWiki:wantedpages-summary]]}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{lua|Module:Labelled list hatnote}}
{{TemplateData header|editlinks=1|docpage=See also/doc}}
 
This template is used to create {{strong|[[WP:Hatnotes|hatnotes]] to point to a small number of other related titles}} at the {{strong|top of article ''[[Help:Section|sections]]''}} (excluding the [[WP:LEAD|lead]]). It looks like this:
 
{{See also|Wikipedia:Article title}}
 
Do not use this template on top of a page, where hatnotes are for disambiguation and not for related topics (according to [[WP:RELATED]]). Do not use this template inside [[Wikipedia:Manual of Style/Layout#"See also" section|the ''"See also" section'']] at the end of an article, or for links to other articles or subsections of the same article within regular article text. Where subsections are linked to, [[Template:Section link]] may be suitable instead. For use on category pages, the corresponding template is [[Template:Category see also]].
 
Refer to the examples below to see how the template handles link targets containing section links and commas.
 
==Usage==
{{see|WP:SUMMARYHATNOTE}}
; Basic usage:
&#123;{See also|''page1''|''page2''|''page3''|...}}
 
; All parameters:
&#123;{See also|''page1''|''page2''|''page3''| ...
|label 1 = ''label 1''|label 2 = ''label2''|label 3 = ''label3''| ...
|l1 = ''label1''|l2 = ''label2''|l3 = ''label3''| ...
|selfref = ''yes''|category = ''no''}}
 
==Parameters==
This template accepts the following parameters:
* {{para|1}}, {{para|2}}, {{para|3}}, ... – the pages to link to. At least one page name is required. Categories and files are automatically escaped with the [[Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''.
* {{para|label 1}}, {{para|label 2}}, {{para|label 3}}, ...; or {{para|l1}}, {{para|l2}}, {{para|l3}}, ...; optional labels for each of the pages to link to.
* {{para|selfref}} – if set to {{pval|yes}}, {{pval|y}}, {{pval|true}}, or {{pval|1}}, adds the CSS class <code>selfref</code>. This is used to denote self-references to Wikipedia. See [[Template:Selfref]] for more information.
* {{para|category}} – if set to {{pval|no}}, {{pval|n}}, {{pval|false}}, or {{pval|0}}, suppresses the error tracking category ([[:Category:Hatnote templates with errors]]). This only has an effect if the first positional parameter (the page to link to) is omitted.
 
== Examples ==
 
{{nowiki template demo|format=inline|code=<nowiki>{{See also|Article}}</nowiki>}}
{{nowiki template demo|format=inline|code=<nowiki>{{See also|Article#Section}}</nowiki>}}
{{nowiki template demo|format=inline|code=<nowiki>{{See also|Article#Section|label 1=Custom section label}}</nowiki>}}
{{nowiki template demo|format=inline|code=<nowiki>{{See also|Article1|Article2|Article3}}</nowiki>}}
{{nowiki template demo|format=inline|code=<nowiki>{{See also|Article1|l1=Custom label 1|Article2|l2=Custom label 2}}</nowiki>}}
{{nowiki template demo|format=inline|code=<nowiki>{{See also|Veni, vidi, vici|Julius Caesar}}</nowiki>}}
{{nowiki template demo|format=inline|code=<nowiki>{{See also|Veni, vidi, vici|Julius Caesar#Civil war}}</nowiki>}}
{{nowiki template demo|format=inline|code=<nowiki>{{See also|Julius Caesar#Civil war|Veni, vidi, vici}}</nowiki>}}
{{nowiki template demo|format=inline|code=<nowiki>{{See also|Julius Caesar#Civil war|Crossing the Rubicon}}</nowiki>}}
 
==Errors==
If no page names are supplied, the template outputs the following message with the (help) wikilink pointing to the "Errors" section of this page:
*{{See also|category=no}}
 
If you see this error message, it is for one of three reasons:
# No parameters were specified (the template code was <code><nowiki>{{See also}}</nowiki></code> with no pipe character nor page to link to). Please use <code><nowiki>{{See also|</nowiki>''page''<nowiki>}}</nowiki></code> instead.
# Some parameters were specified, but no page names were included. For example, the template text <code><nowiki>{{See also|selfref=yes}}</nowiki></code> will produce this error. Please use (for example) <code><nowiki>{{See also|</nowiki>''page''<nowiki>|selfref=yes}}</nowiki></code> instead.
# A page name was specified, but it contains an equals sign ("="). The equals sign has a special meaning in template code, and because of this it cannot be used in template parameters that do not specify a parameter name. For example, the template code <code><nowiki>{{See also|1+1=2|2+2=4}}</nowiki></code> will produce this error. To work around this, you can specify the parameter name explicitly by using <code>1=</code>, <code>2</code>, etc., before the page name, like this: <code><nowiki>{{See also|1=1+1=2|2=2+2=4}}</nowiki></code>.
 
If you see this error message and are unsure of what to do, please post a message on [[WP:HD|the help desk (WP:HD)]], and someone should be able to help you.
 
To see a list of wikilinks to articles that contain this error message, see the [[Wikipedia:Maintenance|maintenance category]]: [[:Category:Hatnote templates with errors]].
 
==TemplateData==
{{Collapse top|[[Wikipedia:TemplateData|TemplateData]] documentation used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools}}
{{TemplateData header|noheader=1}}
<templatedata>
<templatedata>
{
{
"description": "This template creates a hatnote to point to a small number of related pages. It is placed at the top of a section, directly underneath the section heading.",
"params": {
"params": {
"1": {
"1": {
"label": "Page 1",
"label": {
"description": "The name of the first page that you want to link to.",
"en": "Page name",
"cs": "Název stránky",
"fr": "Page 1",
"sv": "Sidnamn"
},
"type": "wiki-page-name",
"type": "wiki-page-name",
"required": true,
"required": true,
"example": "Article name"
"suggested": true,
"description": {
"en": "Full name of related page",
"cs": "Celý název související stránky",
"fr": "Première page: nom complet de la page à laquelle vous voulez faire référence.",
"sv": "Relaterade sidans fulla namn"
},
"example": {
"fr": "1=Article_old  Article/doc  Special:MyLanguage/Articles",
"cs": "Article_old  Article/doc  Special:MyLanguage/Articles"
}
},
},
"2": {
"2": {
"label": "Page 2",
"label": {
"description": "The name of the second page that you want to link to.",
"en": "Page 2",
"cs": "Strana 2",
"fr": "Page 2"
},
"type": "wiki-page-name",
"type": "wiki-page-name",
"required": false
"description": {
"fr": "Seconde page: nom complet de la page à laquelle vous voulez faire référence.",
"cs": "Celý název druhé stránky, na kterou chcete odkazovat."
},
"default": {
"fr": "vide"
}
},
},
"3": {
"3": {
"label": "Page 3",
"label": {
"description": "The name of the third page that you want to link to. More pages can be added using the parameters \"4\", \"5\", \"6\", etc.",
"en": "Page 3",
"cs": "Strana 3",
"fr": "Page 3"
},
"type": "wiki-page-name",
"type": "wiki-page-name",
"required": false
"description": {
},
"fr": "Troisième page: nom complet de la page à laquelle vous voulez faire référence.",
"4": {
"cs": "Celý název třetí stránky, na kterou chcete odkazovat."
"label": "Page 4",
},
"description": "The name of the fourth page that you want to link to.",
"default": {
"type": "wiki-page-name"
"fr": "vide"
},
}
"5": {
"label": "Page 5",
"description": "The name of the fifth page that you want to link to.",
"type": "wiki-page-name"
},
"6": {
"label": "Page 6",
"description": "The name of the sixth page that you want to link to.",
"type": "wiki-page-name"
},
},
"label 1": {
"label 1": {
"label": "Label 1",
"label": {
"en": "Link label",
"cs": "Text odkazu 1",
"fr": "Texte 1",
"sv": "Länktext"
},
"description": {
"en": "Custom link text, to serve as label instead of the page name.",
"cs": "Vlastní text pro odkaz místo názvu stránky.",
"fr": "Première page: texte alternatif affiché pour remplacer le lien de la page.",
"sv": "Anpassad etikett för länken, istället för sidans namn"
},
"type": "string",
"type": "string",
"description": "What the first linked article is to be displayed as. ",
"default": {
"en": "Page name",
"cs": "Název stránky",
"fr": "Copie de Nom de page",
"sv": "Sidnamn"
},
"example": {
"fr": "label 1=Archives Documentation Actualités",
"cs": "Archivní dokumentační zprávy"
},
"aliases": [
"aliases": [
"l1"
"l1"
Line 104: Line 85:
},
},
"label 2": {
"label 2": {
"label": "Label 2",
"type": "string",
"description": "What the second linked article is to be displayed as.",
"aliases": [
"aliases": [
"l2"
"l2"
]
],
"label": {
"en": "Page 2 label",
"cs": "Text 2",
"fr": "Texte 2"
},
"type": "string",
"description": {
"fr": "Seconde page: texte alternatif affiché pour remplacer le lien de la page.",
"cs": "Zobrazený alternativní text, který nahradí odkaz na druhou stránku."
},
"default": {
"fr": "vide"
}
},
},
"label 3": {
"label 3": {
Line 115: Line 106:
"l3"
"l3"
],
],
"label": {
"en": "Page 3 label",
"cs": "Text 3",
"fr": "Texte 3"
},
"type": "string",
"type": "string",
"label": "Label 3",
"description": {
"description": "What the third linked article is to be displayed as. Other labels can be added by using increasing numbers (starting with \"label 4\" or \"l4\" for page 4) as parameter names."
"fr": "Troisième page: texte alternatif affiché pour remplacer le lien de la page.",
"cs": "Zobrazený alternativní text, který nahradí odkaz na třetí stránku."
},
"default": {
"fr": "vide"
}
},
},
"selfref": {
"ll": {
"type": "boolean",
"label": {
"label": "Self reference",
"en": "Use {{ll}}",
"description": "Set to \"yes\" if the template is a self-reference to Wikipedia that would not make sense on mirrors or forks of the Wikipedia site.",
"cs": "Použít {{ll}}",
"example": "yes",
"fr": "ll"
"default": "no"
},
"description": {
"en": "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).",
"cs": "Pokud má tento parametr libovolnou neprázdnou hodnotu, odkazy se generují pomocí {{ll}}, které poskytuje automatické propojení s překladem v uživatelském jazyce a také pomocí přeloženého výchozího textu odkazu (stále platí přepisující texty odkazů).",
"fr": "Si ce paramètre a une valeur non vide, les liens sont traduits, générés en utilisant {{ll}}, qui permet d'accèder automatiquement aux pages traduites dans les autres langues, et d'utiliser pour le lien un texte par défaut déjà traduit (que l'on pourra toujours réécraser)."
},
"type": "line",
"example": {
"en": "ll=TRUE",
"fr": "ll=TRUE"
},
"default": {
"en": "empty",
"fr": "vide"
}
},
},
"category": {
"altphrase": {
"label": "Category",
"description": {
"description": "Set to \"no\", \"n\", \"false\", or \"0\" to suppresses the error tracking category (Category:Hatnote templates with errors). This only has an effect if no page names are specified.",
"en": "Substitution text to replace the default string",
"type": "boolean",
"fr": "Texte pour remplacer la valeur par défaut"
"default": "yes",
},
"example": "no"
"example": {
},
"en": "altphrase=Other related articles ",
"label 4": {
"fr": "altphrase=Autres articles sur le même sujet"
"aliases": [
},
"l4"
"type": "string",
],
"default": {
"label": "Label 4",
"bn": "আরও দেখুন",
"description": "What the fourth linked article is to be displayed as. ",
"cs": "Viz též",
"type": "string"
"de": "Siehe auch",
},
"en": "See also",
"label 5": {
"es": "Véase también",
"aliases": [
"fr": "Voir aussi",
"l5"
"gu": "આ પણ જુઓ",
],
"hu": "Lásd még",
"label": "Label 5",
"id": "Lihat pula",
"description": "What the fifth linked article is to be displayed as. ",
"ja": "関連項目",
"type": "string"
"ko": "같이 보기",
},
"nl": "Zie ook",
"label 6": {
"pl": "Zobacz też",
"aliases": [
"ru": "См. также",
"l6"
"sv": "Se även",
],
"tr": "Ayrıca bakınız",
"label": "Label 6",
"zh": "参见",
"description": "What the sixth linked article is to be displayed as. ",
"ar": "انظر أيضًا",
"type": "string"
"ckb": "ئه‌مانه‌ش ببینه‌"
}
}
}
},
"description": {
"en": "Display up to three page links of other related  (possibly translated) pages.",
"cs": "Zobrazí poznámku o související stránce.",
"fr": "Affiche jusqu'à trois liens de pages (éventuellemnt déjà traduites) relatives au sujet actuel.",
"sv": "Visa en not om en relaterad sida."
},
},
"format": "inline",
"format": "inline",
"paramOrder": [
"paramOrder": [
"1",
"1",
"label 1",
"2",
"2",
"label 2",
"3",
"3",
"4",
"5",
"6",
"label 1",
"label 2",
"label 3",
"label 3",
"label 4",
"ll",
"label 5",
"altphrase"
"label 6",
"selfref",
"category"
]
]
}
}
</templatedata>
</templatedata>
{{Collapse bottom}}
==See also==
*{{tl|For}}
*{{t|Further}}
**{{tl|See}} (redirect to {{tl|Further}})
*{{tl|Template see also}}
*{{tl|Category see also}}
*{{tl|Main}}
*{{tl|Hatnote}}
{{Hatnote templates}}
<includeonly>{{Sandbox other||
<includeonly>{{Sandbox other||
<!-- Categories go here and interwikis go in Wikidata. -->
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Hatnote templates]]
[[Category:Hatnote templates{{#translation:}}]]
[[Category:Related-topic templates]]
[[Category:Wikipedia page-section templates]]
[[Category:Wikipedia see also]]
[[Category:Variadic templates]]
}}</includeonly>
}}</includeonly>

Latest revision as of 17:05, 4 July 2025

Template:Mbox

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:See also in articles based on its TemplateData.

TemplateData for See also

Display up to three page links of other related (possibly translated) pages.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Page name1

Full name of related page

Page namerequired
Link labellabel 1 l1

Custom link text, to serve as label instead of the page name.

Default
Page name
Stringoptional
Page 22

no description

Page nameoptional
Page 2 labellabel 2 l2

no description

Stringoptional
Page 33

no description

Page nameoptional
Page 3 labellabel 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).

Default
empty
Example
ll=TRUE
Lineoptional
altphrasealtphrase

Substitution text to replace the default string

Default
See also
Example
altphrase=Other related articles
Stringoptional