模板:Switcher/doc

維基百科,自由的百科全書
跳至導覽 跳至搜尋

此模板用來在信息框中創建可切換的圖像(附標題)。基於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>