Template:Icon/doc: Difference between revisions
(Added documentation for Template:Icon) |
m (Added positional parameters) |
||
| Line 6: | Line 6: | ||
"type": "string", | "type": "string", | ||
"required": true, | "required": true, | ||
"description": "The target item. Together with prefix and suffix (if provided), is used to generate the item's image's file name [[File:filename]]. It is also used as the text of the label's link." | "description": "The target item. Together with prefix and suffix (if provided), is used to generate the item's image's file name [[File:filename]]. It is also used as the text of the label's link.", | ||
"aliases": [ | |||
"1" | |||
] | |||
}, | }, | ||
"nolink": { | "nolink": { | ||
| Line 45: | Line 48: | ||
"amount": { | "amount": { | ||
"aliases": [ | "aliases": [ | ||
"x" | "x", | ||
"2" | |||
], | ], | ||
"label": "Represents the amount of the item. It is appended to the label, after any additional text. | "label": "Amount", | ||
"type": "number", | |||
"description": "Represents the amount of the item. It is appended to the label, after any additional text." | |||
}, | }, | ||
"text": { | "text": { | ||
"label": "Additional label text", | "label": "Additional label text", | ||
"description": "Additional text to be included in the label. It is not included in the label's link.", | "description": "Additional text to be included in the label. It is not included in the label's link.", | ||
"type": "string" | "type": "string", | ||
"aliases": [ | |||
"3" | |||
] | |||
}, | }, | ||
"note": { | "note": { | ||
Latest revision as of 13:05, 15 June 2025
Show an icon and a label, linking to an article
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Item | name 1 | The target item. Together with prefix and suffix (if provided), is used to generate the item's image's file name [[File:filename]]. It is also used as the text of the label's link. | String | required |
| Disable link? | nolink | no description | Boolean | optional |
| Disable label? | notext | no description | Boolean | optional |
| Link | link | Sets the name of the target wiki page. If not provided, defaults to the value of the item name. | Page name | optional |
| Image size | size s | no description
| Number | optional |
| File extension | ext | Extension of the file, without the starting dot.
| String | optional |
| Amount | amount x 2 | Represents the amount of the item. It is appended to the label, after any additional text. | Number | optional |
| Additional label text | text 3 | Additional text to be included in the label. It is not included in the label's link. | String | optional |
| Note | note | Trailing end note. Will be parenthesized | Unknown | optional |
| File name prefix | prefix | Additional prefix for the file name. | Unknown | optional |
| File name suffix | suffix | Additional suffix for the file name, for example to disambiguate between similar file names. Do not use this to add the extension, use ext instead. | String | optional |
| Item quality | q | Adds a quality icon overlay
| Unknown | optional |
| Quality (unused) | quality | Documented since it is a recognized parameter, but it is not used internally. | Unknown | deprecated |