more cleanup
|
m syntaxhighlight lang="wikitext"
|
||
(11 intermediate revisions by 3 users not shown) | |||
Line 31: | Line 31: | ||
; All parameters, vertical. In alphabetical order, except for <code>portal</code> which is often removed. |
; All parameters, vertical. In alphabetical order, except for <code>portal</code> which is often removed. |
||
< |
<syntaxhighlight lang="wikitext">{{Subject bar |
||
|b = |
|b = |
||
|commons = |
|commons = |
||
Line 43: | Line 43: | ||
|wikt = |
|wikt = |
||
|portal = |
|portal = |
||
}}</ |
}}</syntaxhighlight> |
||
== Parameters explained == |
== Parameters explained == |
||
Line 62: | Line 62: | ||
; <kbd><nowiki>portal</nowiki></kbd>: Use <code><nowiki>portal###</nowiki></code> where ### is any number to link to a portal |
; <kbd><nowiki>portal</nowiki></kbd>: Use <code><nowiki>portal###</nowiki></code> where ### is any number to link to a portal |
||
; <kbd><nowiki>auto</nowiki></kbd>: set {{para|auto|1}} to use Wikidata to find sister links |
; <kbd><nowiki>auto</nowiki></kbd>: set {{para|auto|1}} to use Wikidata to find sister links |
||
; <kbd><nowiki>search</nowiki></kbd>: override default search string (= title of page) |
|||
; <kbd><nowiki>display</nowiki></kbd>: set the display string on the sister links bar |
; <kbd><nowiki>display</nowiki></kbd>: set the display string on the sister links bar |
||
; <kbd><nowiki>commonscat</nowiki></kbd>: link to Commons category instead of gallery |
|||
; <kbd><nowiki>author</nowiki></kbd>: link to Species author instead of taxon |
|||
'''Note''': positional arguments are interpreted as portals, will be appended after any named portal arguments. |
'''Note''': positional arguments are interpreted as portals, will be appended after any named portal arguments. |
||
== Examples == |
== Examples == |
||
Example |
Example: Simplest case. |
||
auto=1: |
auto=1: Try this first to lookup sister project links in Wikidata. |
||
; Markup |
; Markup |
||
: <code><nowiki>{{Subject bar|auto=1}}</nowiki></code> |
: <code><nowiki>{{Subject bar|auto=1}}</nowiki></code> |
||
; Result (if used on [[Lemur]]) |
; Result (if used on [[Lemur]]) |
||
|
{{Subject bar|auto=1|qid=Q1192405}} |
||
---- |
|||
Example page: [[Lemur]] |
Example page: [[Lemur]] |
||
Line 83: | Line 83: | ||
; Result |
; Result |
||
{{Subject bar|commons= Category:Lemuriformes|species = Lemuriformes|portal1 = Primates|portal2 = Madagascar}} |
{{Subject bar|commons= Category:Lemuriformes|species = Lemuriformes|portal1 = Primates|portal2 = Madagascar}} |
||
---- |
|||
Example page: [[Ring-tailed lemur]] |
Example page: [[Ring-tailed lemur]] |
||
Line 114: | Line 110: | ||
* {{tl|Portal bar}} |
* {{tl|Portal bar}} |
||
* {{tl|Sister project links}} |
* {{tl|Sister project links}} |
||
* {{tl|Sister bar}} |
|||
* {{tl|Cross-wiki user}} |
* {{tl|Cross-wiki user}} |
||
{{div col end}} |
{{div col end}} |
||
== TemplateData == |
== TemplateData == |
||
Line 162: | Line 158: | ||
"description": "Use if the ''display name'' is different from the search term. For example, the bear article would be 'Bears'." |
"description": "Use if the ''display name'' is different from the search term. For example, the bear article would be 'Bears'." |
||
}, |
}, |
||
"search": { |
|||
"label": "Search string", |
|||
"type": "string", |
|||
"required": false, |
|||
"description": "String to search in sister projects.", |
|||
"default": "Page title" |
|||
}, |
|||
"commonscat": { |
|||
"label": "Commons category", |
|||
"type": "string", |
|||
"required": false, |
|||
"description": "Use if link to Commons category is desired instead of gallery." |
|||
}, |
|||
"author": { |
|||
"label": "Wikispecies author", |
|||
"type": "string", |
|||
"required": false, |
|||
"description": "Use if link to Wikispecies author is desired instead of taxon." |
|||
}, |
|||
"wikt": { |
"wikt": { |
||
"label": "Wiktionary link", |
"label": "Wiktionary link", |
||
Line 251: | Line 266: | ||
[[Category:Wikipedia Portal navflags|{{PAGENAME}}]] |
[[Category:Wikipedia Portal navflags|{{PAGENAME}}]] |
||
[[Category:Interwiki link templates|{{PAGENAME}}]] |
[[Category:Interwiki link templates|{{PAGENAME}}]] |
||
[[Category:Exclude in print]] |
|||
}}</includeonly> |
}}</includeonly> |
This is a documentation subpage for Template:Subject bar. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on approximately 18,000 pages and changes may be widely noticed. Test changes in the template's /sandboxor/testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua:
|
This navigational template offers a variant to several floating box templates that link to portals, and Wikipedia's sister projects but also typically cause formatting issues because of their size and alignment.
It is intended to be placed at the end of an article, after the references, external links, navboxes and before any authority control template or categories.
No single parameter is required, however, at least one portal or sister project should be utilized with the use of this template. Since Wikipedia articles typically are in the domain of one or more WikiProjects, and since WikiProjects often have a portal, almost every article should list at least one portal. None of the parameters should be capitalized.
When copying all parameters in either the vertical or horizontal layouts, delete those which are not needed. If no links are needed for a particular type, such as the historical "books", that part of the template will not appear on the page.
Parameter meanings (quick list). Alphabetical order: b: Wikibooks. commons: WikiMedia Commons. d: Wikidata. n: Wikinews. q: Wikiquote. s: Wikisource. species: Wikispecies. v: Wikiversity. voy: Wikivoyage. wikt: Wiktionary.
{{Subject bar|commons = y|species = y|voy = y|n = y|wikt = y|b = y|q = y|s = y|v = y|d = y|portal = }}
portal
which is often removed.{{Subject bar|b = |commons = |d = |n = |q = |s = |species = |v = |voy = |wikt = |portal = }}
portal
which is often removed.{{Subject bar
|b=
|commons =
|d=
|n=
|q=
|s=
|species =
|v=
|voy =
|wikt =
|portal =
}}
portal###
where ### is any number to link to a portal|auto=1
to use Wikidata to find sister linksNote: positional arguments are interpreted as portals, will be appended after any named portal arguments.
Example: Simplest case.
auto=1: Try this first to look up sister project links in Wikidata.
{{Subject bar|auto=1}}
Example page: Lemur
{{Subject bar|commons= Category:Lemuriformes|species = Lemuriformes|portal1 = Primates|portal2 = Madagascar}}
Example page: Ring-tailed lemur
{{Subject bar|portal1 = Primates|portal2 = Madagascar|commons = Category:Lemur catta |species = Lemur catta|n = Ring-tailed lemur|wikt = Lemur|b = Ring-tailed lemur|q = Ring-tailed lemur|s = Ring-tailed lemur|v = Ring-tailed lemur|voy = Madagascar}}
{{Portal bar}} is a subset of {{Subject bar}}, where only positional arguments are allowed. For example:
{{Portal bar|COVID-19|Medicine|Viruses}}
TemplateData documentation used by VisualEditor and other tools | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
See a monthly parameter usage report for Template:Subject bar in articles based on its TemplateData.
TemplateData for Subject bar This template adds a bar of portals and sister links. It is usually used just above an article's navboxes.
|