Template:Subject bar/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Jay D. Easy
mNo edit summary
m (68 revisions imported)
 
(19 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Warning|'''This template is not transcluded in mobile view.''' Though [[Wikipedia:Portals|portals]] are generally  not seen in mobile view, [[Wikipedia:Wikimedia sister projects|Wikimedia sister project links]] are transcluded in mobile view when the {{tl|Sister project}} and its sub templates are used.}}
 
{{Documentation subpage}}
{{Documentation subpage}}
{{High-use|11679}}
{{High-use|11679}}
This navigational template offers a variant to several floating box templates that link to <s>[[Wikipedia:Books|books]]</s>{{Define|(?)|  Wikipedia:Books is currently inactive and is retained for historical reference.}}, [[Portal:Contents/Portals|portals]], and [[Wikipedia:Wikimedia sister projects|Wikipedia's sister projects]] but also typically cause formatting issues because of their size and alignment.
It is intended be placed at the end of an article, '''after''' the references, external links, navboxes, authority control template, and '''before''' any [[WP:Category|categories]].
{{Lua|Module:subject bar}}
{{Lua|Module:subject bar}}
{{Uses TemplateStyles|Template:Subject bar/styles.css}}
{{Uses TemplateStyles|Template:Subject bar/styles.css}}
This navigational template is intended be placed at the end of an article, after the ''References'' or ''External links'' and before any navboxes and [[WP:Category|categories]]. It offers an variant to several floating box templates that link to [[Wikipedia:Books|books]], [[Portal:Contents/Portals|portals]], and [[Wikipedia:Wikimedia sister projects|Wikipedia's sister projects]] but also typically cause formatting issues because of their size and alignment.


== Usage ==
== Usage ==
Line 11: Line 14:


== Parameters ==
== Parameters ==
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 "books", that part of the template will not appear on the page.
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.


; All parameters, horizontal
'''Parameter meanings (quick list).''' Alphabetical order:
: <code><nowiki>{{subject bar|b = |b-search = |commons = |commons-search = |d = |d-search = |n = |n-searc h =|q = |q-search = |s = |s-search = |species = |species-search = |v = |v-search = |voy = |voy-search = |wikt = |wikt-search = |book = |portal = |spoken = }}</nowiki></code>
'''b:'''  [[wikibooks:|Wikibooks]].
'''commons:''' [[commons:|WikiMedia Commons]].
'''d:''' [[d:|Wikidata]].
'''n:''' [[wikinews:|Wikinews]].
'''q:''' [[wikiquote:|Wikiquote]].
'''s:''' [[wikisource:|Wikisource]].
'''species:''' [[species:|Wikispecies]].
'''v:''' [[wikiversity:|Wikiversity]].
'''voy:''' [[voy:|Wikivoyage]].
'''wikt:''' [[wiktionary:|Wiktionary]].


; All parameters, vertical
; All parameters, horizontal. Parameters in order they show up in subject bar.
: <code><nowiki>{{subject bar|commons = y|commons-search = |species = y|species-search = |voy = y|voy-search = |n = y|n-search = |wikt = y|wikt-search = |b = y|b-search = |q = y|q-search = |s = y|s-search = |v = y|v-search = |d = y|d-search = |spoken = |portal = }}</nowiki></code>
 
; All parameters, horizontal. In alphabetical order. Except for <code>portal</code> and <code>spoken</code>. Those 2 are often removed.
: <code><nowiki>{{subject bar|b = |b-search = |commons = |commons-search = |d = |d-search = |n = |n-searc h =|q = |q-search = |s = |s-search = |species = |species-search = |v = |v-search = |voy = |voy-search = |wikt = |wikt-search = |portal = |spoken = }}</nowiki></code>
 
; All parameters, vertical. In alphabetical order. Except for <code>portal</code> and <code>spoken</code>. Those 2 are often removed.
<pre>{{subject bar
<pre>{{subject bar
  |b              =  
  |b              =  
Line 37: Line 55:
  |voy-search    =  
  |voy-search    =  
  |wikt          =  
  |wikt          =  
  |wikt-search    =  
  |wikt-search    =   
  |book          =
  |portal        =  
  |portal        =  
  |spoken        =  
  |spoken        =  
}}</pre>
}}</pre>


=== Sister project parameters ===
== Parameters explained ==
{{col-begin}}
{{col-begin}}
{{col-break|width=50%}}
{{col-break|width=50%}}
Line 73: Line 90:


=== Other parameters ===
=== Other parameters ===
; <kbd><nowiki>book</nowiki></kbd>:  Use <code><nowiki>book1</nowiki></code> up to <code><nowiki>book10</nowiki></code> to link to a book
; <s><kbd><nowiki>book</nowiki></kbd></s>:  <s>Use <code><nowiki>book1</nowiki></code> up to <code><nowiki>book10</nowiki></code> to link to a book</s>
; <kbd><nowiki>portal</nowiki></kbd>:  Use <code><nowiki>portal1</nowiki></code> up to <code><nowiki>portal10</nowiki></code> to link to a portal
; <kbd><nowiki>portal</nowiki></kbd>:  Use <code><nowiki>portal1</nowiki></code> up to <code><nowiki>portal10</nowiki></code> to link to a portal
; <kbd><nowiki>spoken</nowiki></kbd>: To provide a link to the spoken Wikipedia, provide the name of the sound file, omitting the <code><nowiki>File:</nowiki></code> prefix
; <kbd><nowiki>spoken</nowiki></kbd>: To provide a link to the spoken Wikipedia, provide the name of the sound file, omitting the <code><nowiki>File:</nowiki></code> prefix


== Examples ==
== Examples ==
Example. Simplest.
All set to "y". In order of use. Portal and spoken removed. Try this first. It will use the article name for all the sister links. Test them all, and adjust as necessary by adding other search terms. Quotes can be placed around search terms to require search results to include the complete phrase.
; Markup
: <code><nowiki>{{subject bar|commons = y|commons-search = |species = y|species-search = |voy = y|voy-search = |n = y|n-search = |wikt = y|wikt-search = |b = y|b-search = |q = y|q-search = |s = y|s-search = |v = y|v-search = |d = y|d-search = }}</nowiki></code>
----
Example page: [[Lemur]]
Example page: [[Lemur]]
:; Markup
; Markup
: <code><nowiki>{{Subject bar|commons = y|commons-search = Category:Lemuriformes|species = y|species-search = Lemuriformes|book = Lemurs|portal1 = Primates|portal2 = Madagascar}}</nowiki></code>
: <code><nowiki>{{Subject bar|commons = y|commons-search = Category:Lemuriformes|species = y|species-search = Lemuriformes|book = Lemurs|portal1 = Primates|portal2 = Madagascar}}</nowiki></code>
:; Result
; Result
{{Subject bar|commons=y|commons-search=Category:Lemuriformes|species=y|species-search=Lemuriformes|book=Lemurs|portal1=Primates|portal2=Madagascar}}&nbsp;<br />{{hr|2}}
{{Subject bar|commons=y|commons-search=Category:Lemuriformes|species=y|species-search=Lemuriformes|book=Lemurs|portal1=Primates|portal2=Madagascar}}
 
 
----
 


Example page: [[Ring-tailed lemur]]
Example page: [[Ring-tailed lemur]]
:; Markup
; Markup
: <code><nowiki>{{Subject bar|book1 = Lemurs|portal1 = Primates|portal2 = Madagascar|commons = y|commons-search = Category:Lemur catta |species = y|species-search = Lemur catta|n = y|n-search = Ring-tailed lemur|wikt=y|wikt-search = Lemur|b = y|b-search = Ring-tailed lemur|q = y|q-search = Ring-tailed lemur|s = y|s-search = Ring-tailed lemur|v = y|v-search = Ring-tailed lemur|voy = y|voy-search = Madagascar}}</nowiki></code>
: <code><nowiki>{{Subject bar|portal1 = Primates|portal2 = Madagascar|commons = y|commons-search = Category:Lemur catta |species = y|species-search = Lemur catta|n = y|n-search = Ring-tailed lemur|wikt=y|wikt-search = Lemur|b = y|b-search = Ring-tailed lemur|q = y|q-search = Ring-tailed lemur|s = y|s-search = Ring-tailed lemur|v = y|v-search = Ring-tailed lemur|voy = y|voy-search = Madagascar}}</nowiki></code>
:; Result
; Result
{{Subject bar|book1=Lemurs|portal1=Primates|portal2=Madagascar|commons=y|commons-search=Category:Lemur catta |species=y|species-search=Lemur catta|n=y|n-search=Ring-tailed lemur|wikt=y|wikt-search=Lemur|b=y|b-search=Ring-tailed lemur|q=y|q-search=Ring-tailed lemur|s=y|s-search=Ring-tailed lemur|v=y|v-search=Ring-tailed lemur|voy=y|voy-search=Madagascar}}
{{Subject bar|portal1=Primates|portal2=Madagascar|commons=y|commons-search=Category:Lemur catta |species=y|species-search=Lemur catta|n=y|n-search=Ring-tailed lemur|wikt=y|wikt-search=Lemur|b=y|b-search=Ring-tailed lemur|q=y|q-search=Ring-tailed lemur|s=y|s-search=Ring-tailed lemur|v=y|v-search=Ring-tailed lemur|voy=y|voy-search=Madagascar}}
 
== Portal bar. Separate bar for "See also" sections ==
 
'''{{tl|Portal bar}}''' may be better since portals are internal links, and can go in the "See also" section if there is one. Portal bars are narrower too, and so they use less space. An example:
{{Portalbar|border=n|Coronavirus disease 2019|Medicine|Viruses}}


=== See also ===
== See also ==
{{div col|colwidth=20em}}
{{div col|colwidth=20em}}
* [[Wikipedia:Template messages/Sister projects]]
* [[Wikipedia:Template messages/Sister projects]]
* {{tl|Book bar}}
* {{tl|Commons}}
* {{tl|Commons}}
* {{tl|Commons category}}
* {{tl|Commons category}}
Line 103: Line 138:
* {{tl|Portal bar}}
* {{tl|Portal bar}}
* {{tl|Sister project links}}
* {{tl|Sister project links}}
* {{tl|Wikipedia-Books}}
* <s>{{tl|Wikipedia-Books}}</s>
{{div end}}
**<s> {{tl|Book bar}}</s>
{{div col end}}


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<includeonly>{{Sandbox other||
[[Category:Wikipedia Portal navflags|{{PAGENAME}}]]
[[Category:Wikipedia Portal navflags|{{PAGENAME}}]]
[[Category:Interwiki link templates|{{PAGENAME}}]]
[[Category:Interwiki link templates|{{PAGENAME}}]]
[[Category:Exclude in print]]
[[Category:Exclude in print]]
}}</includeonly>
}}</includeonly>

Latest revision as of 13:55, 3 September 2020

This navigational template offers a variant to several floating box templates that link to books(?), portals, and Wikipedia's sister projects but also typically cause formatting issues because of their size and alignment.

It is intended be placed at the end of an article, after the references, external links, navboxes, authority control template, and before any categories.

Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.

Usage

No single parameter is required, however, at least one book, 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.

Parameters

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.

All parameters, horizontal. Parameters in order they show up in subject bar.
{{subject bar|commons = y|commons-search = |species = y|species-search = |voy = y|voy-search = |n = y|n-search = |wikt = y|wikt-search = |b = y|b-search = |q = y|q-search = |s = y|s-search = |v = y|v-search = |d = y|d-search = |spoken = |portal = }}
All parameters, horizontal. In alphabetical order. Except for portal and spoken. Those 2 are often removed.
{{subject bar|b = |b-search = |commons = |commons-search = |d = |d-search = |n = |n-searc h =|q = |q-search = |s = |s-search = |species = |species-search = |v = |v-search = |voy = |voy-search = |wikt = |wikt-search = |portal = |spoken = }}
All parameters, vertical. In alphabetical order. Except for portal and spoken. Those 2 are often removed.
{{subject bar
 |b              = 
 |b-search       = 
 |commons        = 
 |commons-search = 
 |d              = 
 |d-search       = 
 |n              = 
 |n-search       = 
 |q              = 
 |q-search       = 
 |s              = 
 |s-search       = 
 |species        = 
 |species-search = 
 |v              = 
 |v-search       = 
 |voy            = 
 |voy-search     = 
 |wikt           = 
 |wikt-search    =  
 |portal         = 
 |spoken         = 
}}

Parameters explained

Other parameters

book
Use book1 up to book10 to link to a book
portal
Use portal1 up to portal10 to link to a portal
spoken
To provide a link to the spoken Wikipedia, provide the name of the sound file, omitting the File: prefix

Examples

Example. Simplest.

All set to "y". In order of use. Portal and spoken removed. Try this first. It will use the article name for all the sister links. Test them all, and adjust as necessary by adding other search terms. Quotes can be placed around search terms to require search results to include the complete phrase.

Markup
{{subject bar|commons = y|commons-search = |species = y|species-search = |voy = y|voy-search = |n = y|n-search = |wikt = y|wikt-search = |b = y|b-search = |q = y|q-search = |s = y|s-search = |v = y|v-search = |d = y|d-search = }}




Example page: Lemur

Markup
{{Subject bar|commons = y|commons-search = Category:Lemuriformes|species = y|species-search = Lemuriformes|book = Lemurs|portal1 = Primates|portal2 = Madagascar}}
Result

Script error: No such module "subject bar".




Example page: Ring-tailed lemur

Markup
{{Subject bar|portal1 = Primates|portal2 = Madagascar|commons = y|commons-search = Category:Lemur catta |species = y|species-search = Lemur catta|n = y|n-search = Ring-tailed lemur|wikt=y|wikt-search = Lemur|b = y|b-search = Ring-tailed lemur|q = y|q-search = Ring-tailed lemur|s = y|s-search = Ring-tailed lemur|v = y|v-search = Ring-tailed lemur|voy = y|voy-search = Madagascar}}
Result

Script error: No such module "subject bar".

Portal bar. Separate bar for "See also" sections

{{Portal bar}} may be better since portals are internal links, and can go in the "See also" section if there is one. Portal bars are narrower too, and so they use less space. An example:


See also