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
Tag: Reverted
Line 1: Line 1:
<!-- Template:Item Infobox -->
<!-- Template:Item Infobox (Custom Table Layout) -->
<!-- Uses the generic Template:Infobox to display item information -->
<includeonly>{| class="infobox" style="float:right; width: 280px; border: 1px solid #aaaaaa; background-color: #f9f9f9; margin-left: 1em; font-size: 90%;"
<includeonly>{{Infobox
|+ style="font-size: 1.2em; font-weight: bold; padding: 0.2em 0.4em;" | {{{name|{{PAGENAME}}}}} <!-- Title -->
| bodyclass= mw-collapsible floatright <!-- Standard class -->
|- <!-- Main row for text and image -->
 
| style="padding: 0.3em 0.6em; vertical-align: top;" | <!-- Left cell for text data -->
<!-- Header/Title Row -->
  {{#if:{{{introduced|}}}|'''Introduced:''' {{{introduced}}}<br />}}
| header1 = {{#if:{{{name|}}}|{{Infobox title icon|{{{name|{{PAGENAME}}}}}|icon={{{icon|}}} }} }}
  {{#if:{{{type|}}}|'''Type:''' {{{type}}}<br />}}
| rowclass1 = infobox-title <!-- Assign class to title row -->
  {{#if:{{{category|}}}|'''Category:''' {{{category}}}<br />}}
 
  {{#if:{{{vendor|}}}|'''Vendor:''' {{{vendor}}}<br />}}
<!-- Image Row -->
  {{#if:{{{dyeable|}}}|'''Dyeable:''' {{{dyeable}}}<br />}}
| image1 = {{#if:{{{image|}}}|[[File:{{{image}}}|{{{imagesize|200px}}}]]|[[File:Placeholderv2.png|200px]]}} <!-- Image content -->
  {{#if:{{{access|}}}|'''Access:''' {{{access}}}<br />}}
| imagerowclass1 = infobox-image <!-- Assign class to image row -->
  {{#if:{{{use_location|}}}|'''Use Location:''' {{{use_location}}}<br />}}
| imagerowstyle1 = text-align:center; <!-- ADDED: Attempt to apply centering style to the image row -->
  <!-- Add more fields here using the same format -->
 
| style="padding: 0.3em 0.6em; vertical-align: top; text-align:center;" | <!-- Right cell for image -->
<!-- Data Rows STARTING FROM label2/data2 -->
  {{#if:{{{image|}}}|[[File:{{{image}}}|center|{{{imagesize|220px}}}]]|[[File:Placeholderv2.png|center|220px]]}}
| label2 = Introduced
|}
| data2 = {{{introduced|}}}
</includeonly><!--
| rowclass2 = data-introduced infobox-data infobox-col1 <!-- Keeping col classes for now -->
 
| label3 = Type
| data3 = {{{type|}}}
| rowclass3 = data-type infobox-data infobox-col2
 
| label4 = Category
| data4 = {{{category|}}}
| rowclass4 = data-category infobox-data infobox-col1
 
| label5 = Vendor
| data5 = {{{vendor|}}}
| rowclass5 = data-vendor infobox-data infobox-col2
 
| label6 = Dyeable
| data6 = {{{dyeable|}}}
| rowclass6 = data-dyeable infobox-data infobox-col1
 
| label7 = Access
| data7 = {{{access|}}}
| rowclass7 = data-access infobox-data infobox-col2
 
| label8 = Use Location
| data8 = {{{use_location|}}}
| rowclass8 = data-uselocation infobox-data infobox-col1
 
<!-- Add more rows if needed -->
 
}}</includeonly><!--


Optional Short description
Optional Short description
Line 55: Line 26:


== Usage ==
== Usage ==
(Documentation remains the same as previous correct version)
This template creates an infobox with the image floated right and text to the left.
 
<pre>
<pre>
{{Item Infobox
{{Item Infobox
| name = Item Name ...
| name = Item Name
| image = ItemImage.png ...
| image = ItemImage.png
...
| imagesize = 250px <!-- Optional, defaults to 220px -->
| introduced = [[Patch Name]] or Date
| type = Item Type
| category = Vendor Category
| vendor = [[Vendor Name]]
| dyeable = Yes / No / [[Dye Type]]
| access = Access restrictions
| use_location = Required location
}}
}}
</pre>
</pre>
</noinclude>
</noinclude>

Revision as of 06:34, 4 April 2025


Usage

This template creates an infobox with the image floated right and text to the left.

{{Item Infobox
| name = Item Name
| image = ItemImage.png
| imagesize = 250px <!-- Optional, defaults to 220px -->
| introduced = [[Patch Name]] or Date
| type = Item Type
| category = Vendor Category
| vendor = [[Vendor Name]]
| dyeable = Yes / No / [[Dye Type]]
| access = Access restrictions
| use_location = Required location
}}
Contents