Bước tới nội dung

Bản mẫu:w/doc

Từ điển mở Wiktionary

This template is for having shorter links to an Wikipedia article when the link is identical to its label. It takes the following parameters:

  • |1= (cần thiết) – the page title on Wikipedia to which you wish to link
  • |2= – the text that the template displays. Default is the value entered in |1=
  • |lang= – the ISO language code of the target Wikipedia. Default is en, for English.

A similar effect can be accomplished using the pipe trick: [[w:Chicken|]] is converted to [[w:Chicken|Chicken]] during the pre-save transform, which renders as Chicken. Only one interwiki prefix can be stripped in this way. [[w:fr:Académie française|]] transforms to [[w:fr:Académie française|fr:Académie française]].

See also Template:wikipedia, which inserts a box with a link to the Wikipedia article, and has no required parameters.

Examples

[sửa]

Notes

[sửa]

Because of its simplicity, the template can be substituted using subst:

  • {{subst:w|William Shakespeare|Shakespeare}} gives: [[w:William Shakespeare|Shakespeare]]

However, substituting {{subst:w|The History of the Decline and Fall of the Roman Empire}} gives an unwieldy duplication of content the template is here to avoid in the first place: [[w:The History of the Decline and Fall of the Roman Empire|The History of the Decline and Fall of the Roman Empire]]

TemplateData

[sửa]
Đây là tài liệu TemplateData cho bản mẫu này, được sử dụng bởi TemplateWizard, VisualEditor và các công cụ khác.

TemplateData cho w

This template is for having shorter links to an Wikipedia article when the link is identical to its label. It had one mandatory parameter. There is a similar one without any mandatory parameter {{wikipedia}}

Tham số bản mẫu

Nên dùng bản mẫu này với các tham số đặt trên cùng một hàng.

Tham sốMiêu tảKiểuTrạng thái
article1

Page to link on Wikipedia

Ví dụ
Cursive script (East Asia)
Chuỗi ngắnbắt buộc
label2

Text displayed on the link

Ví dụ
cursive script
Chuỗi ngắnkhuyên dùng
language codelang

the ISO language code of the target Wikipedia.

Mặc định
en
Ví dụ
es
Chuỗi dàitùy chọn