模板:Subject bar/doc
| File:Edit-copy green.svg | 此頁面是Template:Subject bar的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
| 警告 | 此模板文件被引用於約12,000個頁面。 為了避免造成大規模的影響,所有對此模板文件的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此模板文件中,但是修改前請務必於討論頁發起討論。 模板引用數量會自動更新。 |
| File:Lua-Logo.svg | 此模板使用Lua語言: |
此導航模板提供了幾個浮動框模板的變體,這些模板連結到主題和維基百科的姊妹項目,由於它們的大小和對齊方式,通常也會導致格式問題。
通常放置在文章的末尾,參考文獻、外部連結、導航框之後以及任何權限控制模板或分類之前。
使用[編輯]
使用此模板不需要單個參數,但應使用至少一個門戶或姊妹項目。由於維基百科文章通常屬於一個或多個維基專題,而且維基專題通常有一個主題,因此幾乎每篇文章都應列出至少一個主題。 任何參數都不應大寫。
參數[編輯]
複製垂直或水平佈局中的所有參數時,刪除不需要的參數。 如果特定類型不需要連結,例如歷史「書籍」,則模板的該部分將不會出現在頁面上。
參數含義(快速列表)。 按字母排序: 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=1to 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)
Module:Sister_project_links第466行Lua錯誤:attempt to index field 'wikibase' (a nil value)
Example page: Lemur
- Markup
{{Subject bar|commons= Category:Lemuriformes|species = Lemuriformes|portal1 = Primates|portal2 = Madagascar}}- Result
Module:Sister_project_links第463行Lua錯誤:attempt to index field 'wikibase' (a nil value)
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
Module:Sister_project_links第463行Lua錯誤:attempt to index field 'wikibase' (a nil value)
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
參見[編輯]
- Wikipedia:Template messages/Sister projects
- {{Commons}}
- {{Commons category}}
- {{Commons category multi}}
- {{Commons and category}}
- {{Commons-inline}}
- {{Commons category-inline}}
- {{Portal}}
- {{Portal bar}}
- {{Sister project links}}
- {{Cross-wiki user}}
模板數據[編輯]
|
Subject bar模板資料 <templatedata> { "params": { "portal1": { "required": false, "type": "string/line", "aliases": ["1"], "description": "The first portal, without surrounding text. For example, use \"Science\" to display the science portal." }, "portal2": { "type": "string/line", "aliases": ["2"], "description": "The second portal." }, "portal3": { "type": "string/line", "aliases": ["3"], "description": "The third portal." }, "portal4": { "type": "string/line", "aliases": ["4"], "description": "The fourth portal" }, "portal5": { "type": "string/line", "aliases": ["5"], "description": "The fifth portal." }, "auto": {
"label": "Use wikidata to fill sister link defaults",
"type": "string",
"required": false,
"description": "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": { "label": "Display name", "type": "string", "required": false, "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": {
"label": "Wiktionary link", "type": "string", "required": false, "description": "Wiktionary link to show. Acceptable values are a page name, \"yes\" (find page automatically) and \"no\".", "aliases": ["wikt-search"],
"default": "No"
}, "commons": { "label": "Commons link", "type": "string", "required": false, "description": "Commons link to show. Acceptable values are a page name, \"yes\" (find page automatically) and \"no\".", "aliases": ["c", "c-search", "commons-search"], "default": "No" }, "n": { "label": "Wikinews link", "type": "string", "required": false, "description": "Wikinews link to show. Acceptable values are a page name, \"yes\" (find page automatically) and \"no\".", "aliases": ["n-search"], "default": "No" }, "q": { "label": "Wikiquote link", "type": "string", "required": false, "description": "Wikiquote link to show. Acceptable values are a page name, \"yes\" (find page automatically) and \"no\".", "aliases": ["q-search"], "default": "No" }, "s": { "label": "Wikisource link", "type": "string", "required": false, "description": "Wikisource link to show. Acceptable values are a page name, \"yes\" (find page automatically) and \"no\".", "aliases": ["s-search"], "default": "No" }, "b": { "label": "Wikibooks link", "type": "string", "required": false, "description": "Wikibooks link to show. Acceptable values are a page name, \"yes\" (find page automatically) and \"no\".", "aliases": ["b-search"], "default": "No" }, "voy": { "label": "Wikivoyage link", "type": "string", "required": false, "description": "Wikivoyage link to show. Acceptable values are a page name, \"yes\" (find page automatically), and \"no\".", "aliases": ["voy-search"], "default": "No" }, "v": { "label": "Wikiversity link", "type": "string", "required": false, "description": "Wikiversity link to show. Acceptable values are a page name, \"yes\", (find page automatically) and \"no\".", "aliases": ["v-search"], "default": "No" }, "d": { "label": "Wikidata link", "type": "string", "required": false, "description": "Wikidata link to show. Acceptable values are a QID, \"yes\" (find page automatically), and \"no\".", "aliases": ["d-search"], "default": "No" }, "species": { "label": "Wikispecies taxon link", "type": "string", "required": false, "description": "Wikispecies link to show. Acceptable values are a page name, \"yes\" (find page automatically), and \"no\". The default is \"No\".", "aliases": ["species-search"], "default": "No" } }, "description": "This template adds a bar of portals and sister links. It is usually used just above an article's navboxes." } </templatedata> |