Template:Item: Difference between revisions
added "link" param; improv docs |
added to item templates cat |
||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
}} | }} | ||
[[Category:Item templates]] | |||
[[Category:Image templates]] | [[Category:Image templates]] | ||
[[Category:Template starter-kit]] | [[Category:Template starter-kit]] | ||
Line 47: | Line 48: | ||
"description": "Makes the first letter in the label uppercase.", | "description": "Makes the first letter in the label uppercase.", | ||
"type": "boolean", | "type": "boolean", | ||
" | "suggested": true, | ||
" | "default": "0" | ||
}, | }, | ||
"link": { | "link": { | ||
Line 54: | Line 55: | ||
"description": "A link to give to the item. By default, a link is added if it's defined in the config - read more in Module:Item.", | "description": "A link to give to the item. By default, a link is added if it's defined in the config - read more in Module:Item.", | ||
"type": "wiki-page-name", | "type": "wiki-page-name", | ||
"suggested": true | |||
}, | |||
"capitalize all": { | |||
"aliases": [ | |||
"cap all" | |||
], | |||
"label": "Capitalize all", | |||
"description": "Makes the first letter in every word inside the label uppercase.", | |||
"type": "boolean", | |||
"default": "0", | |||
"suggested": true | "suggested": true | ||
} | } | ||
Line 63: | Line 74: | ||
"label", | "label", | ||
"capitalize", | "capitalize", | ||
"capitalize all", | |||
"link" | "link" | ||
], | ], |
Latest revision as of 09:56, 28 March 2025
Examples
Basic
{{item
↓
For items without icons
Used here is some abstract item without icon.
{{item
↓
foldable
Specifying amount of items
{{item
↓
More examples
Custom label
{{item
↓
Empty label
To remove the label alltogether, pass an empty string to label
.
{{item
↓
Capitalizing the label
This makes the first letter of the label uppercase.
{{item
or
{{item
↓
Proto-kinetic accelerator
or
Proto-kinetic accelerator
Capitalizing each word in the label
This makes the first letter in each word inside the label uppercase.
{{item
or
{{item
↓
Proto-kinetic Accelerator
or
Proto-kinetic Accelerator
Custom icon size
{{item
↓
Adding links
{{item
↓

A list of all items with icons
See Template:Item/doc/list of items with icons.
A list of all items
See Template:Item/doc/list_of_items.
Errors
Unknown item
{{item
↓
Lua error in Module:Item at line 89: item generation failed: no item was found by ID/name 'lorem ipsum honk'.Produces an in-game item icon with a label. The label is the name of that item. Items without icons... will not have icons. See extra parameters for extra spice!
Parameter | Description | Type | Status | |
---|---|---|---|---|
Item | 1 | What item are you looking for? ID, name or a custom alias? Use whatever you wish! Any casing is allowed, including lowercase.
| Line | required |
Amount | 2 | Amount of item. By default, no amount in particular is chosen.
| Number | suggested |
Size | size | Icon size
| Line | suggested |
Label | label l | Label override. | Line | suggested |
Capitalize | capitalize cap | Makes the first letter in the label uppercase.
| Boolean | suggested |
Capitalize all | capitalize all cap all | Makes the first letter in every word inside the label uppercase.
| Boolean | suggested |
Link | link | A link to give to the item. By default, a link is added if it's defined in the config - read more in Module:Item. | Page name | suggested |