模板:Switcher/doc
跳至導覽
跳至搜尋
| File:Edit-copy green.svg | 此頁面是Template:Switcher的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
此模板用來在信息框中創建可切換的圖像(附標題)。基於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>