Template:Subject bar/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Zyxw
m (add usage count and let template round number)
meta>Jay D. Easy
(thorough polishing)
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.}}
{{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}}
{{Lua|Module:subject bar}}
{{Lua|Module:subject bar}}
{{Uses TemplateStyles|Template:Subject bar/styles.css}}
{{Uses TemplateStyles|Template:Subject bar/styles.css}}
{{High-use|11679}}
 
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.
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 ==
'''''Note: ''''' None of the parameters should be capitalized. For example, use "commons", "v"..., not "Commons", "V"...
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 [[Wikipedia:WikiProject|WikiProjects]], and since WikiProjects often have a [[Wikipedia:Portal|portal]], almost every article should list at least one portal. None of the parameters should be capitalized.


=== All 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 "books", that part of the template will not appear on the page.
; All parameters, horizontal
: <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>


;All parameters, horizontal layout: <code><nowiki>{{Subject bar |book= |portal= |commons= |commons-search= |species= |species-search= |n= |n-search= |wikt= |wikt-search= |b= |b-search= |q= |q-search= |s= |s-search= |v= |v-search= |voy= |voy-search= |d= |d-search= }}</nowiki></code>
; All parameters, vertical
<pre>{{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   =  
|book          =
|portal        =  
|spoken        =  
}}</pre>


;All parameters, vertical layout:
=== Sister project parameters ===
<pre>
{{col-begin}}
{{Subject bar
{{col-break|width=50%}}
|book          =  
; <kbd><nowiki>b</nowiki></kbd>: Setting any value for this parameter will result in a link to [[wikibooks:|Wikibooks]]
|portal        =  
; <kbd><nowiki>b-search</nowiki></kbd>: To replace the default (article name) search string
|commons        =  
; <kbd><nowiki>commons</nowiki></kbd>: Setting any value for this parameter will result in a link to [[commons:|WikiMedia Commons]]
|commons-search =  
; <kbd><nowiki>commons-search</nowiki></kbd>: To replace the default (article name) search string
|species        =  
: To search by category, start with <code><nowiki>Category:</nowiki></code>
|species-search =
; <kbd><nowiki>d</nowiki></kbd>: Setting any value for this parameter will result in a link to [[d:|Wikidata]]
|n              =
; <kbd><nowiki>d-search</nowiki></kbd>: To replace the default (article name) search string
|n-search      =
; <kbd><nowiki>n</nowiki></kbd>: Setting any value for this parameter will result in a link to [[wikinews:|Wikinews]]
|wikt          =  
; <kbd><nowiki>n-search</nowiki></kbd>: To replace the default (article name) search string
|wikt-search    =
; <kbd><nowiki>q</nowiki></kbd>: Setting any value for this parameter will result in a link to [[wikiquote:|Wikiquote]]
|b              =
; <kbd><nowiki>q-search</nowiki></kbd>: To replace the default (article name) search string
|b-search       =
|q              =
|q-search       =
|s              =
|s-search       =
|spoken        =
|v              =
|v-search       =
|voy            =
|voy-search     =
|d              =
|d-search       =
}}
</pre>


=== Using multiple books and portals ===
{{col-break}}
; <kbd><nowiki>s</nowiki></kbd>: Setting any value for this parameter will result in a link to [[wikisource:|Wikisource]]
; <kbd><nowiki>s-search</nowiki></kbd>: To replace the default (article name) search string
: To search by author, start with <code><nowiki>Author:</nowiki></code>
; <kbd><nowiki>species</nowiki></kbd>: Setting any value for this parameter will result in a link to [[species:|Wikispecies]]
; <kbd><nowiki>species-search</nowiki></kbd>: To replace the default (article name) search string
; <kbd><nowiki>v</nowiki></kbd>: Setting any value for this parameter will result in a link to [[wikiversity:|Wikiversity]]
; <kbd><nowiki>v-search</nowiki></kbd>: To replace the default (article name) search string
; <kbd><nowiki>voy</nowiki></kbd>: Setting any value for this parameter will result in a link to [[voy:|Wikivoyage]]
; <kbd><nowiki>voy-search</nowiki></kbd>: To replace the default (article name) search string
; <kbd><nowiki>wikt</nowiki></kbd>: Setting any value for this parameter will result in a link to [[wiktionary:|Wiktionary]]
; <kbd><nowiki>wikt-search</nowiki></kbd>: To replace the default (article name) search string
{{col-end}}


The for articles linking to a single book or portal, use the sample code that follows. If more than one book or portal is needed (up to 10 of each), append a number as follows: <br/>
=== Other parameters ===
<code><nowiki>{{Subject bar |book1= |book2= |book3= | ... | |portal1= |portal2= |portal3= |...}}</nowiki></code>
; <kbd><nowiki>book</nowiki></kbd>:  Use <code><nowiki>book1</nowiki></code> up to <code><nowiki>book10</nowiki></code> to link to b book
 
; <kbd><nowiki>portal</nowiki></kbd>: Use <code><nowiki>portal1</nowiki></code> up to <code><nowiki>portal10</nowiki></code> to link to a portal
==== Required parameters ====
; <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
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 [[Wikipedia:WikiProject|WikiProjects]], and since WikiProjects often have a [[Wikipedia:Portal|portal]], almost every article should list at least one portal.
 
==== Optional parameters ====
 
* Book parameters
** '''book'''
** '''book1''', '''book2''', '''book3''', ...
* Portal parameters
** '''portal'''
** '''portal1''', '''portal2''', '''portal3''', ...
* Sister project parameters
** '''commons''': Setting any value for this parameter will result in a link to [[commons:|WikiMedia Commons]]. The default search string is the article name.
** '''commons-search''': This value replaces the default Commons search string. To search by category, start with "Category:".
** '''species''': Setting any value for this parameter will result in a link to [[species:|Wikispecies]]. The default search string is the article name.
** '''species-search''': This value replaces the default Wikispecies search string.
** '''n''': Setting any value for this parameter will result in a link to [[wikinews:|Wikinews]]. The default search string is the article name.
** '''n-search''': This value replaces the default Wikinews search string.
** '''wikt''': Setting any value for this parameter will result in a link to [[wiktionary:|Wiktionary]]. The default search string is the article name.
** '''wikt-search''': This value replaces the default Wiktionary search string.
** '''b''': Setting any value for this parameter will result in a link to [[wikibooks:|Wikibooks]]. The default search string is the article name.
** '''b-search''': This value replaces the default Wikibooks search string.
** '''q''': Setting any value for this parameter will result in a link to [[wikiquote:|Wikiquote]]. The default search string is the article name.
** '''q-search''': This value replaces the default Wikiquote search string.
** '''s''': Setting any value for this parameter will result in a link to [[wikisource:|Wikisource]]. The default search string is the article name.
** '''s-search''': This value replaces the default Wikisource search string. To search by author, start with "Author:".
** '''spoken''': This parameter is for the spoken Wikipedia. Provide the name of the sound file, omitting the "File:" prefix.
** '''v''': Setting any value for this parameter will result in a link to [[wikiversity:|Wikiversity]]. The default search string is the article name.
** '''v-search''': This value replaces the default Wikiversity search string.
** '''voy''': Setting any value for this parameter will result in a link to [[voy:|Wikivoyage]]. The default search string is the article name.
** '''voy-search''': This value replaces the default Wikivoyage search string.
** '''d''': Setting any value for this parameter will result in a link to [[d:|Wikidata]]. The default search string is the article name.
** '''d-search''': This value replaces the default Wikidata search string.


== Examples ==
== Examples ==
Example page: [[Lemur]]
:; Markup
: <code><nowiki>{{Subject bar|commons = y|commons-search = Category:Lemuriformes|species = y|species-search = Lemuriformes|book = Lemurs|portal1 = Primates|portal2 = Madagascar}}</nowiki></code>
:; Result
{{Subject bar|commons=y|commons-search=Category:Lemuriformes|species=y|species-search=Lemuriformes|book=Lemurs|portal1=Primates|portal2=Madagascar}}&nbsp;<br />{{hr|2}}


;Examples using one or more of each type
Example page: [[Ring-tailed lemur]]
 
:; Markup
* Article name = [[Lemur]]
: <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
:; Result
|book= Lemurs
{{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}}
|portal1= Primates
|portal2= Madagascar
|commons= y
|commons-search= Category:Lemuriformes
|species= y
|species-search= Lemuriformes
}}</nowiki></code>
 
{{Subject bar |book= Lemurs |portal1= Primates |portal2= Madagascar |commons= y |commons-search= Category:Lemuriformes |species= y |species-search= Lemuriformes}}
 
* Article name = [[Ring-tailed lemur]]
<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
|wikt= y
|wikt-search= Lemur
|b= y
|q= y
|s= y
|v= y
|voy= y
|voy-search= Madagascar
}}</nowiki></code>
 
{{Subject bar |book1= Lemurs |portal1= Primates |portal2= Madagascar |commons= y |commons-search= Category:Lemur catta |species= y |species-search= Lemur catta |n= y |n-searh= 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}}
 
;Examples omitting one or more types
 
* Article name = [[William Charles Osman Hill]]
<code><nowiki>{{Subject bar
|portal1= Biography
|portal2= Primates
|s= y
|s-search= Author:William Charles Osman Hill
|v= y
}}</nowiki></code>
 
{{Subject bar |portal1= Biography |portal2= Primates |s= y |s-search= Author:William Charles Osman Hill |v= y |v-search= William Charles Osman Hill}}
 
* Article name = [[Subfossil lemur]]
<code><nowiki>{{Subject bar
|book1= Subfossil lemurs
|book2= Lemurs
|portal1= Primates
|portal2= Madagascar
}}</nowiki></code>
 
{{Subject bar |book1= Subfossil lemurs |book2= Lemurs |portal1= Primates |portal2= Madagascar}}
 
* Article name = [[Intermembral index]]
<code><nowiki>{{Subject bar
|portal = Primates
}}</nowiki></code>
 
{{Subject bar |portal = Primates}}


=== See also ===
=== See also ===
* [[Template:Sister project links]]
{{div col|colwidth=20em}}
* [[Wikipedia:Template messages/Sister projects]]
* [[Wikipedia:Template messages/Sister projects]]
* [[Template:Commons]]
* {{tl|Book bar}}
* [[Template:Commons category]]
* {{tl|Commons}}
* [[Template:Commons category multi]]
* {{tl|Commons category}}
* [[Template:Commons and category]]
* {{tl|Commons category multi}}
* [[Template:Commons-inline]]
* {{tl|Commons and category}}
* [[Template:Commons category-inline]]
* {{tl|Commons-inline}}
* [[Template:Portal]]
* {{tl|Commons category-inline}}
* [[Template:Portal bar]]
* {{tl|Portal}}
* [[Template:Wikipedia-Books]]
* {{tl|Portal bar}}
* [[Template:Book bar]]
* {{tl|Sister project links}}
* {{tl|Wikipedia-Books}}
{{div end}}


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||

Revision as of 14:43, 3 June 2019

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

This navigational template is intended be placed at the end of an article, after the References or External links and before any navboxes and categories. It offers an 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.

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

All parameters, horizontal
{{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 = }}
All parameters, vertical
{{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    = 
 |book           = 
 |portal         = 
 |spoken         = 
}}

Sister project parameters

Other parameters

book
Use book1 up to book10 to link to b 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 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". 
Template:Hr

Example page: Ring-tailed lemur

Markup
{{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}}
Result

Script error: No such module "subject bar".

See also