Template:Item Infobox: Difference between revisions
Appearance
Created page with "<includeonly><!-- --><infobox> <title source="name"> <format>{{#if:{{{number|}}}|<span class="number">{{{number}}} </span>}}{{{name|{{PAGENAME}}}}}</format> </title> <image source="image"> </image> <group layout="horizontal"> <data source="category"> <label>Category</label> <format>[[{{{category}}}]]</format> </data> <data source="type"> <label>Type</label> <format>[[{{{type}}}]]</format> </data> </group> <data sou..." |
No edit summary |
||
| (24 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly>{{#invoke:Infobox|main | ||
-->< | |kind = Item | ||
|sep = , | |||
|class = quality-{{#if:{{{quality|}}}|{{lc:{{{quality}}}}}|none}} | |||
|title = <!-- | |||
-->{{{title|<!-- | |||
-->{{#if:{{{number|}}}|<span class="archive-number">{{{number}}}</span>}}<!-- | |||
-->{{{name|{{PAGENAME}}}}}<!-- | |||
-->}}} | |||
|subtitle = {{{subtitle|}}} | |||
|image = {{#if:{{{image|}}}|[[File:{{{image|}}}]]|[[File:{{{title|{{{name|{{PAGENAME}}}}}}}} Icon.png]]}} | |||
|images = {{#if:{{{images|}}}|{{Array|{{{images}}}|;|[[File:²{#explode:{item}¦:¦0}²]]|,|template=1}}}} | |||
|tabs = {{#if:{{{images|}}}|{{Array|{{{images}}}|;|²{#explode:{item}¦:¦1}²|,|template=1}}}} | |||
|sections = Information, How to Obtain | |||
|Information_collapsible = Yes | |||
|Information = Category, Type, Quality, Color, Strength, Effect, Collection Score, Selling Price | |||
|Category = {{#if:{{{category|}}}|[[{{{category}}}]]}} | |||
|Type = {{#if:{{{type|}}}|{{Array|{{{type}}}|;|[[{item}]]|, }}}} | |||
|Type_label = Type{{#if:{{#explode:{{{type}}}|;|1}}|s}} | |||
|Quality = {{#if:{{{quality|}}}|<span class="quality-label">{{{quality}}}</span>}} | |||
|Color = {{#if:{{{color|}}}|{{Array|{{{color}}}|;|[[{item}]]|, |sort=1}}}} | |||
|Color_label = Color{{#if:{{#explode:{{{color}}}|;|1}}|s}} | |||
|Strength = {{#if:{{{strength|}}}|+{{{strength}}}}} | |||
|Effect = {{{effect|}}} | |||
|Collection Score = {{#ifeq:{{{category|}}}|Crop|{{#switch:{{{quality|}}}|<!-- | |||
-->|Gray|Common = +5<!-- | |||
-->|Blue|Uncommon = +10<!-- | |||
-->|Purple|Rare = +15<!-- | |||
-->|Gold|Stellar = +30<!-- | |||
-->|#default = +?<!-- | |||
-->}}<!-- | |||
-->|{{{score|}}}}} | |||
|Selling Price = {{#if:{{{sell|{{{price|}}}}}}|{{Item|Dough|20|x={{{sell|{{{price}}}}}}}}}} | |||
|How to Obtain_collapsible = Yes | |||
|How to Obtain = Source | |||
|Source = {{#if:{{#explode:{{{source}}}|;|1}}|{{List|{{{source}}}}}|{{{source|}}}}} | |||
|Source_label = Source{{#if:{{#explode:{{{source}}}|;|1}}|s}} | |||
}}{{#if:{{{description|}}}|{{Description|{{{description}}}}}}}<!-- | |||
-->{{#invoke:Bucket|put|items | |||
|+templateargs = name, number, quality, category, type, strength, source, effect, description, images | |||
|page_id = {{PAGEID}} | |||
|sell = {{{sell|{{{price|}}}}}} | |||
|source-delimiter = ; | |||
|image = {{{image|{{{title|{{{name|{{PAGENAME}}}}}}}} Icon.png}}} | |||
|images-delimiter = ; | |||
|removed = {{{removed|0}}} | |||
}}<!-- | |||
-->{{Namespace|main=<!-- | -->{{Namespace|main=<!-- | ||
-->[[Category: | -->[[Category:Items]]<!-- | ||
Sort | Sort | ||
-->{{#if:{{{number|}}}|[[Category: | -->{{#if:{{{number|}}}|[[Category:Item|{{{number}}}]]|[[Category:Item]][[Category:Item Missing Number]]}}<!-- | ||
Category | Category | ||
-->{{#if:{{{category|}}}|[[Category:{{{category}}}]]}}<!-- | -->{{#if:{{{category|}}}|[[Category:{{{category}}}]]}}<!-- | ||
Type | Type | ||
-->{{#if:{{{type|}}}|[[Category:{{{ | -->{{#if:{{{type|}}}|{{Array|{{{type}}}|;|[[Category:{item}]]}}|}}<!-- | ||
-->{{#if:{{{color|}}}|{{Cat List|{{{color}}}|{item} Items}}}}<!-- | |||
-->{{#switch:{{{quality}}}|Gray| | Quality | ||
{{#if:{{{quality|}}}|[[Category: | -->{{#switch:{{{quality}}}|Gray|Blue|Purple|Gold|Common|Uncommon|Rare|Stellar=[[Category:{{{quality}}} Quality]]}} | ||
|Gray | {{#if:{{{quality|}}}|[[Category:Item by Quality|{{#switch:{{{quality|}}} | ||
| | |Gray|Common = 0 | ||
|Purple | |Blue|Uncommon = 1 | ||
|Gold | |Purple|Rare = 2 | ||
|Gold|Stellar = 3 | |||
|#default = 4 | |#default = 4 | ||
}}]]}}<!-- | }}]]}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
--></includeonly><noinclude>{{Documentation|type=Infobox}}</noinclude> | --></includeonly><noinclude>{{Documentation|type=Infobox}}</noinclude> | ||
Latest revision as of 16:06, 13 October 2026
Template documentation
Note: parts of or the entire template might not be visible without values provided.
Note: parts of or the entire template might not be visible without values provided.
| Main | Documentation | Usage |
This template uses Module:Infobox, a script written in Lua.
This template uses CSS found at MediaWiki:Gadget-Infobox.css.
Template that creates an infobox for Items.
Syntax
[edit source]{{Item Infobox
|name =
|category =
|type =
|quality =
|sell =
|description =
|source =
}}
- name – Name of the item.
- category – Category of the item.
- type – Type of the item.
- quality – Quality of the item.
- sell – Selling price of the item.
- description – Description of the item.
- source – Source(s) of the item as a semicolon separated list.
Other parameters
[edit source]- image – Override the default image with a single file. Default: name Icon.png.
- images – Override the default image with multiple files and tabs.
- Format: Image 1.ext:Tab 1 name; Image 2.ext:Tab 2 name; ... ; Image N.ext:Tab N name.
Example
[edit source]
{{Item Infobox
|name = Wildgrass
|category = Materials
|type = Wildgrass
|quality = Gray
|sell = 1
|description = Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|source = Example
}}
Wildgrass
How to Obtain
Source
Example
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
{{Item Infobox
|name = Example
|images = Hexia Meadows Luca Fruit Icon.png:Icon; Hexia Meadows Preview.png:Preview
|category = Example
|type = Example
|quality = Green
|sell = 100
|description = Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|source = Example; Example; Example
}}
Example
How to Obtain
Sources
- Example
- Example
- Example
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Template Data
[edit source]Template that creates an infobox for items.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name | name | Name of the item.
| String | required |
| Number | number | Sorting number for the item. | Number | suggested |
| Category | category | Category of the item.
| String | suggested |
| Type | type | Type of the item.
| String | optional |
| Quality | quality | Quality of the item.
| String | suggested |
| Selling price | sell price | Selling price of the item.
| Number | optional |
| Description | description | Description of the item. | Content | suggested |
| Source | source | Source(s) of the item as a semicolon separated list.
| Content | suggested |
| Image | image | Override the default image with a single file.
| File | optional |
| Images | images | Override the default image with multiple files and tabs.
| Content | optional |
