Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Item Infobox: Difference between revisions

Template page
No edit summary
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 2: Line 2:
<!-- Uses the generic Template:Infobox to display item information -->
<!-- Uses the generic Template:Infobox to display item information -->
<includeonly>{{Infobox
<includeonly>{{Infobox
| bodyclass= mw-collapsible floatright <!-- Standard class from your example -->
| bodyclass= mw-collapsible floatright <!-- Standard class -->
| image1 = {{#if:{{{image|}}}|[[File:{{{image}}}|{{{imagesize|200px}}}]]|[[File:Placeholderv2.png|200px]]}} <!-- Use provided image or placeholder, default size 200px -->
| imagerowclass1 = infobox-image <!-- Assign class to image row -->


| header1 = {{#if:{{{name|}}}|{{Infobox title icon|{{{name|{{PAGENAME}}}}}|icon={{{icon|Item}}} }} }} <!-- Display name, default icon 'Item' -->
<!-- Header/Title Row -->
| header1 = {{#if:{{{name|}}}|{{Infobox title icon|{{{name|{{PAGENAME}}}}}|icon={{{icon|}}} }} }}
| rowclass1 = infobox-title <!-- Assign class to title row -->
| rowclass1 = infobox-title <!-- Assign class to title row -->


| label2 = Introduced <!-- Row 2: Label -->
<!-- Image Row -->
| data2 = {{{introduced|}}} <!-- Row 2: Data from 'introduced' parameter -->
| image1 = {{#if:{{{image|}}}|[[File:{{{image}}}|400px]]|[[File:Placeholderv2.png|400px]]}}
| rowclass2 = data-introduced infobox-data infobox-col1 <!-- Assign classes (adjust col1/col2 as needed for your layout) -->
| imagerowclass1 = infobox-image <!-- Assign class to image row -->
 
<!-- Data Rows STARTING FROM label2/data2 -->
| label2 = Introduced
| data2 = {{{introduced|}}}
| rowclass2 = data-introduced infobox-data infobox-col1 <!-- Keeping col classes for now -->


| label3 = Type <!-- Row 3: Label -->
| label3 = Type
| data3 = {{{type|}}} <!-- Row 3: Data from 'type' parameter -->
| data3 = {{{type|}}}
| rowclass3 = data-type infobox-data infobox-col2 <!-- Assign classes -->
| rowclass3 = data-type infobox-data infobox-col2


| label4 = Category <!-- Row 4: Label -->
| label4 = Category
| data4 = {{{category|}}} <!-- Row 4: Data from 'category' parameter -->
| data4 = {{{category|}}}
| rowclass4 = data-category infobox-data infobox-col1 <!-- Assign classes -->
| rowclass4 = data-category infobox-data infobox-col1


| label5 = Vendor <!-- Row 5: Label -->
| label5 = Vendor
| data5 = {{{vendor|}}} <!-- Row 5: Data from 'vendor' parameter -->
| data5 = {{{vendor|}}}
| rowclass5 = data-vendor infobox-data infobox-col2 <!-- Assign classes -->
| rowclass5 = data-vendor infobox-data infobox-col2


| label6 = Dyeable <!-- Row 6: Label -->
| label6 = Dyeable
| data6 = {{{dyeable|}}} <!-- Row 6: Data from 'dyeable' parameter -->
| data6 = {{{dyeable|}}}
| rowclass6 = data-dyeable infobox-data infobox-col1 <!-- Assign classes -->
| rowclass6 = data-dyeable infobox-data infobox-col1


| label7 = Access <!-- Row 7: Label -->
| label7 = Access
| data7 = {{{access|}}} <!-- Row 7: Data from 'access' parameter -->
| data7 = {{{access|}}}
| rowclass7 = data-access infobox-data infobox-col2 <!-- Assign classes -->
| rowclass7 = data-access infobox-data infobox-col2


| label8 = Use Location <!-- Row 8: Label -->
| label8 = Use Location
| data8 = {{{use_location|}}} <!-- Row 8: Data from 'use_location' parameter -->
| data8 = {{{use_location|}}}
| rowclass8 = data-uselocation infobox-data infobox-col1 <!-- Assign classes -->
| rowclass8 = data-uselocation infobox-data infobox-col1


<!-- Add more rows if needed by incrementing numbers: label9, data9, rowclass9, etc. -->
<!-- Add more rows if needed -->


<!-- Optional Button Bar - Adapt if items need specific links -->
<!--
| header21 = {{#if:{{{some_item_link|}}}|{{Infobox buttons|type=item|someurl={{{some_item_link|}}}}}|<span></span>}}
| rowclass21 = infobox-button-bar
-->
}}</includeonly><!--
}}</includeonly><!--


Optional Short description for items
Optional Short description
--><includeonly>{{Short description|Game item in Outlands}}</includeonly><!--
--><includeonly>{{Short description|Game item in Outlands}}</includeonly><!--


Line 52: Line 51:
--><noinclude>
--><noinclude>
[[Category:Infobox Templates]]
[[Category:Infobox Templates]]
[[Category:Item Templates]] <!-- Or a more specific category -->
[[Category:Item Templates]]


== Usage ==
== Usage ==
This template creates an infobox for game items by using the generic [[Template:Infobox]].
(Documentation remains the same as previous correct version)
 
<pre>
<pre>
{{Item Infobox
{{Item Infobox
| name = Item Name (defaults to page name if omitted)
| name = Item Name ...
| image = ItemImage.png (defaults to Placeholderv2.png if omitted)
| image = ItemImage.png ...
| imagesize = 250px <!-- Optional, defaults to 200px -->
...
| icon = OptionalIconName <!-- Optional, for title bar, defaults to 'Item' -->
| introduced = [[Patch Name]] or Date
| type = Item Type (e.g., Container, Weapon)
| category = Vendor Category (e.g., Misc)
| vendor = [[Vendor Name]]
| dyeable = Yes / No / [[Dye Type]]
| access = Access restrictions (e.g., House Co-Owners Only)
| use_location = Required location (e.g., Secured in House)
<!-- Add any other parameters you define here -->
}}
}}
</pre>
</pre>
</noinclude>
</noinclude>

Latest revision as of 08:21, 4 April 2025


Usage

(Documentation remains the same as previous correct version)

{{Item Infobox
| name = Item Name ...
| image = ItemImage.png ...
...
}}
Contents