Template:Item/doc: Difference between revisions
(→Specifying amount of items: more test examples) |
(→Adding links: example fix) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Examples == | == Examples == | ||
=== Basic === | |||
{{tji|item|lv}} | {{tji|item|lv}} | ||
Line 5: | Line 6: | ||
{{item|lv}} | {{item|lv}} | ||
=== For items without icons === | |||
{{Callout | |||
|Info | |||
|Not all items have their icons uploaded to the wiki. Such items will only have their label displayed.<br> | |||
Used here is some abstract item without icon.}} | |||
{{tji|item|foldable}} | |||
{{gda}} | |||
{{item|foldable}} | |||
=== Specifying amount of items === | === Specifying amount of items === | ||
Line 63: | Line 77: | ||
{{item|proto-kinetic accelerator|label=}} | {{item|proto-kinetic accelerator|label=}} | ||
==== Capitalizing the label ==== | |||
This makes the first letter of the label uppercase. | |||
{{tji|item|proto-kinetic accelerator|capitalize:1}} <br> | |||
{{gray or}} <br> | |||
{{tji|item|proto-kinetic accelerator|cap:1}} | |||
{{gda}} | |||
{{item|proto-kinetic accelerator|capitalize=1}} <br> | |||
{{gray or}} <br> | |||
{{item|proto-kinetic accelerator|cap=1}} | |||
=== Custom icon size === | === Custom icon size === | ||
Line 70: | Line 98: | ||
{{item|lv|size=64px}} | {{item|lv|size=64px}} | ||
=== Adding links === | |||
{{tji|item|Deckard|link:Guns}} | |||
{{gda}} | |||
{{item|Deckard|link = Guns}} | |||
{{Callout|Info|Some items have links by default, such as {{item|protolathe}}, so with this option you can override them as you wish.}} | |||
== A list of all items with icons == | == 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 == | == Errors == | ||
=== Unknown item | === Unknown item === | ||
{{tji|item|lorem ipsum honk}} | {{tji|item|lorem ipsum honk}} | ||
Line 83: | Line 121: | ||
{{item|lorem ipsum honk}} | {{item|lorem ipsum honk}} | ||
Latest revision as of 05:13, 4 September 2024
Examples
Basic
{{item
↓
LV cable coil
For items without icons
Used here is some abstract item without icon.
{{item
↓
foldable
Specifying amount of items
{{item
↓
25 steel
More examples
Custom label
{{item
↓
hole-maker
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
Custom icon size
{{item
↓
LV cable coil
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 83: item generation failed: no item was found by ID/name 'lorem ipsum honk'.