模板:Top icon/doc

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

在頁面標題右側放置圖示。

注意:本模板使用了頁面狀態指示器

用法[編輯]


{{Top icon
| id = ID(若指定此項將不使用頁面狀態指示器)
| class = HTML class(若指定此項將不使用頁面狀態指示器)
| image = 圖片名(或「imagename」)
| size = 大小(預設24,不需填入px)
| alt = 替代文字
| description = 描述文字(滑鼠懸停時顯示)
| link = 連結目標(或「wikilink」)
| usercat = [[Category:放置於用戶頁時的分類]]
| maincat = [[Category:放置於主命名空間頁面時的分類]]
| subpage = no或only(模板置於子頁時是否加分類)
| nocat = true(不分類)或false(全部分類,哪怕是黑名單的頁面)或留空(正常分類)
}}

以下表格未更新,請以上文為準

<templatedata> { "paramOrder": [ "name", "image", "size", "link", "alt", "text", "sortkey", "usercat", "maincat", "subpage", "nocat" ], "params": { "image": { "description": "圖示檔案名稱", "type": "wiki-file-name", "required": true, "aliases": [ "imagename" ], "autovalue": "" }, "size": { "description": "圖示大小,單位為像素", "type": "string", "default": "20" }, "alt": { "description": "替代文字,用於滑鼠放在圖示上時顯示說明文字", "type": "string", "suggested": true }, "link": { "description": "連結的目標頁面", "type": "wiki-page-name", "required": true, "aliases": [ "wikilink" ] }, "name": { "aliases": [ "id" ], "description": "為每個圖示分配的唯一名稱", "type": "string", "autovalue": "Top icon/doc", "required": true }, "text": { "aliases": [ "description" ], "type": "string" }, "sortkey": {}, "usercat": {}, "maincat": {}, "subpage": {}, "nocat": {} } } </templatedata>