跳至內容

模板:Sister bar/doc

維基百科,自由的百科全書

The {{Sister bar}} template provides links corresponding pages on various Wikimedia sister projects, similar to {{Sister project links}}. Unlike that other template, {{Sister bar}} creates a horizontal bar for the sister projects links. This template is designed for use when there is not enough space in the External links section for a Sister project links box. It is designed to go after other navboxes, similar to {{Portal bar}}.

The following pages are sought by the template, in order:

  • An explicit page chosen by an editor (if provided)
  • A sitelink in Wikidata (if exists)
  • A search page on the sister project

Sending a reader to a search page can be an unpleasant experience, if there is no corresponding page for that subject. Editors have a choice between two methods to prevent this negative experience:

  • Manually check each project for a relevant page, if missing, then set argument to "no" (e.g., |wikt=n)
  • Use "automatic mode", which only displays a sister project by default if sitelink exists (e.g., |auto=yes)

Parameters

[編輯]
{{Sister bar
<!-- Configuration parameters. Do not leave empty; populate, or remove -->
 |1= |auto= |display=

<!-- Projects that default to "yes" when auto=no -->
 |b= |c= |n= |q= |s= |v= |wikt= 

<!-- Projects that default to "no" when auto=no -->
 |d= |m= |mw= |species= |species_author= |voy= 

 |author= <!-- force search for author name in wikisource -->
 |commonscat= <!-- force link to commons category -->
}}

All parameters:
{{Sister project links |1= |author= |auto= |b= |c= |commonscat= |d= |display= |m= |mw= |n= |q= |qid= |s= |species= |species_author= |v= |voy= |wikt= }}

Default display

[編輯]

For any project parameter, there are four acceptable values:

  • "yes" means find a reasonable link for the sister project (wikidata, or default back to search)
  • "no" means exclude this sister project: no link
  • a string means link to the page with whose name is that string
  • blank or missing means use the default
    • If |auto=yes, default is either use wikidata (if present), or drop the link
    • If |auto=no, if project is in the "yes" list above, either use wikidata or search. Otherwise drop the link.

Tracking categories

[編輯]

TemplateData

[編輯]
以下是該模板的模板資料,適用於視覺化編輯器等工具。

Sister bar模板資料

Displays a terminal window with a set of commands. If the titles in the individual sister projects differ, use the following parameters, which are taken from [[Help:跨語言連結|Help:Interwiki linking]].

模板參數

參數描述類型狀態
Search Parameter1

Use if the ''search parameter'' differs from the pagename.

字串非必填
Use wikidata to fill 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'.

字串非必填
Wiktionary linkwikt

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

預設
Yes
字串非必填
Commons linkc commons

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

預設
Yes
字串非必填
Commons category?commonscat

Specifies whether a link to a category on Wikimedia Commons is shown. Can be "yes" or "no". The default is "No".

預設
No
字串非必填
Wikinews linkn

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

預設
Yes
字串非必填
Wikiquote linkq

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

預設
Yes
字串非必填
Wikisource links

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

預設
Yes
字串非必填
Wikisource author?author

Use for articles about authors to force the Wikisource links to include the "Author:" prefix. Can be set to "yes" or "no". The default is "No".

預設
No
字串非必填
Wikibooks linkb

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

預設
Yes
字串非必填
Wikivoyage linkvoy

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

預設
No
字串非必填
Wikiversity linkv

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

預設
Yes
字串非必填
Wikidata linkd

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

預設
No
字串非必填
Wikispecies taxon linkspecies

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

預設
No
字串非必填
Wikispecies author linkspecies_author

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

預設
No
字串非必填
Meta linkm

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

預設
No
字串非必填
MediaWiki linkmw

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

預設
No
字串非必填