Template:Official website
跳转到导航
跳转到搜索
File:Test Template Info-Icon - Version (2).svg 模板文档[查看] [编辑] [历史] [清除缓存]
| File:Lua-Logo.svg | 此模板使用Lua语言: |
| 警告 | 此Template被引用於約50,000個頁面。 為了避免造成大規模的影響,所有對此Template的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此Template中,但是修改前請務必於討論頁發起討論。 模板引用數量會自動更新。 |
模板介紹[编辑]
本模板用于在条目中添加官方网站的連結,它是规范的书写格式,请注意格式。本模板使用于条目的“外部链接”章节,信息框中应使用{{Official URL}}。
使用方法[编辑]
本模板使用维基数据資源:
Module:Uses_Wikidata第13行Lua错误:attempt to index field 'wikibase' (a nil value)
| 代码 | 结果 |
|---|---|
{{Official website}}
|
官方网站(维基数据上必须有d:Property:P856的URL值) |
{{Official website|example.org}}
|
官方网站 |
{{Official website|www.example.org}}
|
官方网站 |
{{Official website|//www.example.org}}
|
官方网站 |
{{Official website|http://www.example.org/}}
|
官方网站 |
{{Official website|https://www.example.org/}}
|
官方网站 |
{{Official website|1=http://www.example.org/?action=view}}
|
官方网站 |
{{Official website|http://www.example.org|name=Example}}
|
Example |
{{Official website|example.org|mobile=http://m.example.org}}
|
官方网站 (移动端) |
{{Official website|mobile=http://m.example.org|URL=example.org}}
|
官方网站 (移动端) |
{{Official website|example.org|format=flash}}
|
官方网站 (需要Adobe Flash Player) |
模板數據[编辑]
<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}}