Template:Subject bar/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Dpleibovitz
m (Note Lua usage)
meta>Nnemo
(Notably — Giving the good example. Accessibility. Air. Corr.)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS LINKS AT THE END OF THIS PAGE -->
 
{{lua|Module:subject bar}}
{{lua|Module:subject bar}}
This navigational template is intended be placed at the bottom of an article, after the References or External Links and before the [[WP:Category|categories]]. It offers an alternative 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 the [[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", etc. - not "Commons", "V", etc.
'''''Note:''''' None of the parameters should be capitalized. For example, use "commons", "v", not "Commons", "V"
 
=== All parameters ===


===All 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.


Line 38: Line 41:
</pre>
</pre>


===Using multiple books and portals===
=== Using multiple books and portals ===
The for articles linking to a single book or portal, use the sample code below. If more than one book or portal is needed (up to 10 of each), append a number as follows:<br>
 
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/>
<code><nowiki>{{Subject bar |book1= |book2= |book3= | ... | |portal1= |portal2= |portal3= |...}}</nowiki></code>
<code><nowiki>{{Subject bar |book1= |book2= |book3= | ... | |portal1= |portal2= |portal3= |...}}</nowiki></code>


====Required parameters====
==== Required parameters ====
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 fall under 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.
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 ====


====Optional parameters====
* Book parameters
*book parameters
** '''book'''
**'''book'''
** '''book1''', '''book2''', '''book3''', ...
**'''book1''', '''book2''', '''book3''', ...
* Portal parameters
*portal parameters
** '''portal'''
**'''portal'''
** '''portal1''', '''portal2''', '''portal3''', ...
**'''portal1''', '''portal2''', '''portal3''', ...
* Sister project parameters
*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''': 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:".
**'''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''': 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.
**'''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''': 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.
**'''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''': 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.
**'''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''': 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.
**'''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''': 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.
**'''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''': 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:".
**'''s-search''': This value replaces the default Wikisource search string. To search by author, start with "Author:".
** '''v''': Setting any value for this parameter will result in a link to [[wikiversity:|Wikiversity]]. The default search string is the article name.
**'''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.
**'''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''': 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.
**'''voy-search''': This value replaces the default Wikivoyage search string.


==Examples==
== Examples ==


;Examples using one or more of each type  
;Examples using one or more of each type  


*Article name = [[Lemur]]
* Article name = [[Lemur]]
<code><nowiki>{{Subject bar  
<code><nowiki>{{Subject bar  
|book= Lemurs
|book= Lemurs
Line 89: Line 94:
{{Subject bar |book= Lemurs |portal1= Primates |portal2= Madagascar |commons= y |commons-search= Category:Lemuriformes |species= y |species-search= Lemuriformes}}
{{Subject bar |book= Lemurs |portal1= Primates |portal2= Madagascar |commons= y |commons-search= Category:Lemuriformes |species= y |species-search= Lemuriformes}}


*Article name = [[Ring-tailed lemur]]
* Article name = [[Ring-tailed lemur]]
<code><nowiki>{{Subject bar  
<code><nowiki>{{Subject bar  
|book1= Lemurs
|book1= Lemurs
Line 113: Line 118:
;Examples omitting one or more types  
;Examples omitting one or more types  


*Article name = [[William Charles Osman Hill]]
* Article name = [[William Charles Osman Hill]]
<code><nowiki>{{Subject bar  
<code><nowiki>{{Subject bar  
|portal1= Biography
|portal1= Biography
Line 124: Line 129:
{{Subject bar |portal1= Biography |portal2= Primates |s= y |s-search= Author:William Charles Osman Hill |v= y |v-search= William Charles Osman Hill}}
{{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]]
* Article name = [[Subfossil lemur]]
<code><nowiki>{{Subject bar  
<code><nowiki>{{Subject bar  
|book1= Subfossil lemurs
|book1= Subfossil lemurs
Line 134: Line 139:
{{Subject bar |book1= Subfossil lemurs |book2= Lemurs |portal1= Primates |portal2= Madagascar}}
{{Subject bar |book1= Subfossil lemurs |book2= Lemurs |portal1= Primates |portal2= Madagascar}}


*Article name = [[Intermembral index]]
* Article name = [[Intermembral index]]
<code><nowiki>{{Subject bar  
<code><nowiki>{{Subject bar  
|portal = Primates
|portal = Primates
Line 141: Line 146:
{{Subject bar |portal = Primates}}
{{Subject bar |portal = Primates}}


===See also===
=== See also ===
* [[Template:Sister project links]]
* [[Template:Sister project links]]
* [[Wikipedia:Template messages/Sister projects]]
* [[Wikipedia:Template messages/Sister projects]]
Line 156: Line 161:


<includeonly>
<includeonly>
<!-- CATEGORIES AND INTERWIKIS BELOW THIS LINE PLEASE -->
 
<!-- CATEGORIES AND INTERWIKIS LINKS AFTER THIS LINE PLEASE -->
 
[[Category:Wikipedia Portal navflags|{{PAGENAME}}]]
[[Category:Wikipedia Portal navflags|{{PAGENAME}}]]
[[Category:Interwiki link templates|{{PAGENAME}}]]
[[Category:Interwiki link templates|{{PAGENAME}}]]
Line 162: Line 169:


[[tr:Şablon:Konu çubuğu]]
[[tr:Şablon:Konu çubuğu]]
</includeonly>
</includeonly>

Revision as of 12:30, 5 June 2014

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

Note: None of the parameters should be capitalized. For example, use "commons", "v"…, not "Commons", "V"…

All 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 layout
{{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=}}
All parameters, vertical layout
{{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     = 
}}

Using multiple books and portals

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:
{{Subject bar |book1= |book2= |book3= | ... | |portal1= |portal2= |portal3= |...}}

Required parameters

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.

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 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 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. 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. 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. 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. 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. 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:".
    • v: Setting any value for this parameter will result in a link to 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 Wikivoyage. The default search string is the article name.
    • voy-search: This value replaces the default Wikivoyage search string.

Examples

Examples using one or more of each type

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

Script error: No such module "subject bar".

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

Script error: No such module "subject bar".

Examples omitting one or more types

{{Subject bar |portal1= Biography |portal2= Primates |s= y |s-search= Author:William Charles Osman Hill |v= y }}

Script error: No such module "subject bar".

{{Subject bar |book1= Subfossil lemurs |book2= Lemurs |portal1= Primates |portal2= Madagascar }}

Script error: No such module "subject bar".

{{Subject bar |portal = Primates }}

Script error: No such module "subject bar".

See also