跳转到内容

Template:Wikidata link

来自维基学院
文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

A template to create a link to either Wikiversity, Wikipedia, Wikisource, Commons, or Reasonator.

Using the specified Wikidata QID, the template checks for the existence of other sitelinks (in this order: 中文維基學院, 中文維基百科, 中文維基文庫 and 維基共享資源) and if one is found links to it. If none is found, it links directly to Wikidata.

Description Wikitext Output
直接用法:調出該Wikidata項目的中文維基百科連結 {{Wikidata link|Q42}} 道格拉斯·亞當斯
捷徑用法: 同上,但是使用簡短詞 {{wdl|Q42}} 道格拉斯·亞當斯
該Wikidata項目有中文維基文庫的連結 {{wdl|Q106531597}} 吃人與禮教
該Wikidata項目同時缺少中文維基百科和中文維基文庫的連結 {{wdl|Q54856396}} Fonts with Representations of the Seven Sacraments: Supplement
該Wikidata項目存在維基共享資源連結 {{wdl|Q60727470}} Alfred Cooper Fryer
自訂連結的顯示名稱 {{wdl|Q42|Mr Adams}} Mr Adams

Templatedata

[编辑源代码]

Link to Wikisource, Wikipedia, Commons, or Reasonator, depending on the sitelinks of the given Wikidata item.

模板参数[编辑模板数据]

此模板首选参数不换行的行内格式。

参数描述类型状态
Wikidata ID1

The Q-number of the item.

字符串必需
Link text2

The text that will be displayed as the link.

字符串推荐

See also

[编辑源代码]