此导航模板提供了几个浮动框模板的变体,这些模板链接到主题维基百科的姊妹项目,由于它们的大小和对齐方式,通常也会导致格式问题。

通常放置在文章的末尾,参考文献、外部链接、导航框之后以及任何权限控制模板或分类之前

使用

编辑

使用此模板不需要单个参数,但应使用至少一个门户或姊妹项目。由于维基百科文章通常属于一个或多个维基专题,而且维基专题通常有一个主题,因此几乎每篇文章都应列出至少一个主题。 任何参数都不应大写。

参数

编辑

复制垂直或水平布局中的所有参数时,删除不需要的参数。 如果特定类型不需要链接,例如历史“书籍”,则模板的该部分将不会出现在页面上。

参数含义(快速列表)。 按字母排序: b: 维基教科书. commons: 维基共享资源. d: 维基数据. n: 维基新闻s. q: 维基语录. s: 维基文库. species: 维基物种. v: 维基学院. voy: 维基导游. wikt: 维基词典.

所有参数,水平。 参数按顺序显示在主题栏中。
{{Subject bar|commons = y|species = y|voy = y|n = y|wikt = y|b = y|q = y|s = y|v = y|d = y|portal = }}
所有参数,水平。 按字母顺序排列,除了portal经常被删除。
{{Subject bar|b = |commons = |d = |n = |q = |s = |species = |v = |voy = |wikt = |portal = }}
所有参数,垂直。 按字母顺序排列,除了portal经常被删除。
{{Subject bar
 |b              = 
 |commons        = 
 |d              = 
 |n              = 
 |q              = 
 |s              = 
 |species        = 
 |v              = 
 |voy            = 
 |wikt           =  
 |portal         = 
}}

参数说明

编辑
b
Wikibooks page to link to, "yes" means use wikidata to search for page
commons
WikiMedia Commons page (or Category:) to link to, "yes" means use wikidata to search for page
d
Wikidata page to link to, "yes" means use wikidata to search for page
n
Wikinews page to link to, "yes" means use wikidata to search for page
q
Wikiquote page to link to, "yes" means use wikidata to search for page
s
Wikisource page (or Author:) to link to, "yes" means use wikidata to search for page
species
Wikispecies page to link to, "yes" means use wikidata to search for page
v
Wikiversity page to link to, "yes" means use wikidata to search for page
voy
Wikivoyage page to link to, "yes" means use wikidata to search for page
wikt
Wiktionary page to link to, "yes" means use wikidata to search for page

Other parameters

编辑
portal
Use portal### where ### is any number to link to a portal
auto
set |auto=1 to use Wikidata to find sister links
search
override default search string (= title of page)
display
set the display string on the sister links bar
commonscat
link to Commons category instead of gallery
author
link to Species author instead of taxon

Note: positional arguments are interpreted as portals, will be appended after any named portal arguments.

Examples

编辑

Example. Simplest.

auto=1: try this first to look sister project links up in wikidata

Markup
{{Subject bar|auto=1}}
Result (if used on Lemur)

Example page: Lemur

Markup
{{Subject bar|commons= Category:Lemuriformes|species = Lemuriformes|portal1 = Primates|portal2 = Madagascar}}
Result

Example page: Ring-tailed lemur

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

Portal bar

编辑

{{Portal bar}} is a subset of {{Subject bar}}, where only positional arguments are allowed. For example:

Markup
{{Portal bar|COVID-19|Medicine|Viruses}}
Result

参见

编辑

模板数据

编辑
可视化编辑器和其他工具使用的模板数据文档

Subject bar模板数据

This template adds a bar of portals and sister links. It is usually used just above an article's navboxes.

模板参数

参数描述类型状态
portal1portal1 1

The first portal, without surrounding text. For example, use "Science" to display the science portal.

单行文本可选
portal2portal2 2

The second portal.

单行文本可选
portal3portal3 3

The third portal.

单行文本可选
portal4portal4 4

The fourth portal

单行文本可选
portal5portal5 5

The fifth portal.

单行文本可选
Use wikidata to fill sister link defaultsauto

If auto="yes", then sister projects with wikidata sitelinks are filled-in, others are off by default. Each project can be overridden with its own parameter.

字符串可选
Display namedisplay

Use if the ''display name'' is different from the search term. For example, the bear article would be 'Bears'.

字符串可选
Search stringsearch

String to search in sister projects.

默认值
Page title
字符串可选
Commons categorycommonscat

Use if link to Commons category is desired instead of gallery.

字符串可选
Wikispecies authorauthor

Use if link to Wikispecies author is desired instead of taxon.

字符串可选
Wiktionary linkwikt wikt-search

Wiktionary link to show. Acceptable values are a page name, "yes" (find page automatically) and "no".

默认值
No
字符串可选
Commons linkcommons c c-search commons-search

Commons link to show. Acceptable values are a page name, "yes" (find page automatically) and "no".

默认值
No
字符串可选
Wikinews linkn n-search

Wikinews link to show. Acceptable values are a page name, "yes" (find page automatically) and "no".

默认值
No
字符串可选
Wikiquote linkq q-search

Wikiquote link to show. Acceptable values are a page name, "yes" (find page automatically) and "no".

默认值
No
字符串可选
Wikisource links s-search

Wikisource link to show. Acceptable values are a page name, "yes" (find page automatically) and "no".

默认值
No
字符串可选
Wikibooks linkb b-search

Wikibooks link to show. Acceptable values are a page name, "yes" (find page automatically) and "no".

默认值
No
字符串可选
Wikivoyage linkvoy voy-search

Wikivoyage link to show. Acceptable values are a page name, "yes" (find page automatically), and "no".

默认值
No
字符串可选
Wikiversity linkv v-search

Wikiversity link to show. Acceptable values are a page name, "yes", (find page automatically) and "no".

默认值
No
字符串可选
Wikidata linkd d-search

Wikidata link to show. Acceptable values are a QID, "yes" (find page automatically), and "no".

默认值
No
字符串可选
Wikispecies taxon linkspecies species-search

Wikispecies link to show. Acceptable values are a page name, "yes" (find page automatically), and "no". The default is "No".

默认值
No
字符串可选