Template:Icon: Difference between revisions

From Coral Island Wiki
Jump to navigation Jump to search
(Added template parameter documentation)
(Undo revision 26979 by Ftdb (talk): Seemingly added unwanted changes in other wiki pages.)
Tags: Replaced Undo
Line 1: Line 1:
<includeonly>{{#invoke:Icon|main}}</includeonly>
<includeonly>{{#invoke:Icon|main}}</includeonly>
<noinclude>
<templatedata>
{
"params": {
"name": {
"label": "Item",
"type": "string",
"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."
},
"nolink": {
"label": "Disable link?",
"type": "boolean"
},
"notext": {
"label": "Disable label?",
"type": "boolean"
},
"link": {
"label": "Link",
"description": "Sets the name of the target wiki page. If not provided, defaults to the value of the item name.",
"type": "wiki-page-name"
},
"size": {
"aliases": [
"s"
],
"label": "Image size",
"type": "number",
"suggestedvalues": [
"16",
"24",
"32",
"40",
"48"
],
"default": "30"
},
"ext": {
"label": "File extension",
"description": "Extension of the file, without the starting dot.",
"example": "png",
"type": "string",
"default": "png"
},
"amount": {
"aliases": [
"x"
],
"label": "Represents the amount of the item. It is appended to the label, after any additional text.",
"type": "number"
},
"text": {
"label": "Additional label text",
"description": "Additional text to be included in the label. It is not included in the label's link.",
"type": "string"
},
"note": {
"label": "Note",
"description": "Trailing end note. Will be parenthesized"
},
"prefix": {
"label": "File name prefix",
"description": "Additional prefix for the file name."
},
"suffix": {
"label": "File name suffix",
"description": "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.",
"type": "string"
},
"q": {
"label": "Item quality",
"type": "unknown",
"suggestedvalues": [
"1",
"2",
"3",
"4",
"bronze",
"silver",
"gold",
"osmium"
],
"description": "Adds a quality icon overlay"
},
"quality": {
"label": "Quality (unused)",
"description": "Documented since it is a recognized parameter, but it is not used internally.",
"deprecated": "Use q (Item Quality) instead."
}
},
"description": "Show an icon and a label, linking to an article",
"paramOrder": [
"name",
"nolink",
"notext",
"link",
"size",
"ext",
"amount",
"text",
"note",
"prefix",
"suffix",
"q",
"quality"
]
}
</templatedata>
</noinclude>

Revision as of 12:33, 15 June 2025