模板:Official website/doc
脚本错误:没有“Message box”这个模块。 脚本错误:没有“High-use”这个模块。 Template:NoteTA
模板介绍[编辑]
本模板用于在条目中添加官方网站的连结,它是规范的书写格式,请注意格式。本模板使用于条目的“外部链接”章节,信息框中应使用{{Official URL}}。
使用方法[编辑]
| 代码 | 结果 |
|---|---|
{{Official website}}
|
官方网站(维基数据上必须有d:Property:P856的URL值) |
{{Official website|example.org}}
|
Template:Official website |
{{Official website|www.example.org}}
|
Template:Official website |
{{Official website|//www.example.org}}
|
Template:Official website |
{{Official website|http://www.example.org/}}
|
Template:Official website |
{{Official website|https://www.example.org/}}
|
Template:Official website |
{{Official website|1=http://www.example.org/?action=view}}
|
Template:Official website |
{{Official website|http://www.example.org|name=Example}}
|
Template:Official website |
{{Official website|example.org|mobile=http://m.example.org}}
|
Template:Official website |
{{Official website|mobile=http://m.example.org|URL=example.org}}
|
Template:Official website |
{{Official website|example.org|format=flash}}
|
Template:Official website |
模板数据[编辑]
Template:TemplateDataHeader <TemplateData> { "description": "本模板用于在条目中添加官方网站的连结。", "params": { "1": { "label": "网址", "description": "需要连结的网址", "type": "string" }, "name": { "label": "显示文字", "description": "连结要显示的文字,若不指定将会显示预设的“官方网站”", "type": "string", "default": "官方网站", "required": false }, "mobile": { "label": "行动版网址", "description": "如果该网站为了移动设备设有不同的网址,请将之填入此处", "type": "string", "required": false }, "format": { "label": "需要Flash", "description": "如果该网站需要Adobe Flash Player才能显示,请在本项参数填入“flash”", "type": "string", "required": false } }, "format": "inline" } </TemplateData>
重定向[编辑]
- {{Official website}} = {{Official}} = {{官方网站}} = {{官网}}
参见[编辑]
- {{Official websites}}
- {{URL}}