模板:Switcher
跳转到导航
跳转到搜索
File:Test Template Info-Icon - Version (2).svg 模板文档[查看] [编辑] [历史] [清除缓存]
此模板用来在信息框中创建可切换的图像(附标题)。基于MediaWiki:Gadget-switcher.js小工具。
参数[编辑]
奇数参数以wiki文本格式提供图像,偶数参数提供图像标题。
示例[编辑]
{{Switcher
| [[File:Example.png|300px]]
| An example
| [[File:Example image not to be used in article namespace.jpg|300px]]
| A different example
}}
输出:
模板数据[编辑]
<templatedata> { "params": { "1": { "description": "Image 1 wikitext", "example": "File:Example.png", "type": "unbalanced-wikitext" }, "2": { "description": "Image 1 caption", "example": "This is just an example.", "type": "string" }, "3": { "description": "See {{{1}}} (recursive)", "type": "unbalanced-wikitext" }, "4": { "description": "See {{{2}}} (recursive)", "type": "string" } }, "description": "Creates a switchable image with caption for use in infoboxes" } </templatedata>