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
Tag: Reverted
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- Template:Item Infobox (Custom Table Layout v2 - Image Float Attempt) -->
<!-- Template:Item Infobox -->
<includeonly>{| class="infobox" style="float:right; width: 280px; border: 1px solid #aaaaaa; background-color: #f9f9f9; margin-left: 1em; font-size: 90%; padding: 0.3em;"
<!-- Uses the generic Template:Infobox to display item information -->
|+ style="font-size: 1.2em; font-weight: bold; padding-bottom: 0.3em;" | {{{name|{{PAGENAME}}}}} <!-- Title -->
<includeonly>{{Infobox
|- <!-- Main row for content -->
| bodyclass= mw-collapsible floatright <!-- Standard class -->
| style="vertical-align: top;" | <!-- Single cell for all content -->
 
  <!-- Image floated right INSIDE the cell -->
<!-- Header/Title Row -->
  {{#if:{{{image|}}}|
| header1 = {{#if:{{{name|}}}|{{Infobox title icon|{{{name|{{PAGENAME}}}}}|icon={{{icon|}}} }} }}
    [[File:{{{image}}}|right|{{{imagesize|150px}}}|link=]] <!-- Use 'right' attribute, smaller default size for floating -->
| rowclass1 = infobox-title <!-- Assign class to title row -->
  }}
 
  <!-- Text data follows the image, should wrap -->
<!-- Image Row -->
  {{#if:{{{introduced|}}}|<div style="padding-bottom: 0.2em;">'''Introduced:''' {{{introduced}}}</div>}}
| image1 = {{#if:{{{image|}}}|[[File:{{{image}}}|400px]]|[[File:Placeholderv2.png|400px]]}}
  {{#if:{{{type|}}}|<div style="padding-bottom: 0.2em;">'''Type:''' {{{type}}}</div>}}
| imagerowclass1 = infobox-image <!-- Assign class to image row -->
  {{#if:{{{category|}}}|<div style="padding-bottom: 0.2em;">'''Category:''' {{{category}}}</div>}}
 
  {{#if:{{{vendor|}}}|<div style="padding-bottom: 0.2em;">'''Vendor:''' {{{vendor}}}</div>}}
<!-- Data Rows STARTING FROM label2/data2 -->
  {{#if:{{{dyeable|}}}|<div style="padding-bottom: 0.2em;">'''Dyeable:''' {{{dyeable}}}</div>}}
| label2 = Introduced
  {{#if:{{{access|}}}|<div style="padding-bottom: 0.2em;">'''Access:''' {{{access}}}</div>}}
| data2 = {{{introduced|}}}
  {{#if:{{{use_location|}}}|<div style="padding-bottom: 0.2em;">'''Use Location:''' {{{use_location}}}</div>}}
| rowclass2 = data-introduced infobox-data infobox-col1 <!-- Keeping col classes for now -->
  <!-- Add more fields here, wrapped in divs for spacing -->
 
|}
| label3 = Type
</includeonly><!--
| 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 29: Line 54:


== Usage ==
== Usage ==
This template creates an infobox attempting to float the image right with text wrapping left.
(Documentation remains the same as previous correct version)
 
<pre>
<pre>
{{Item Infobox
{{Item Infobox
| name = Item Name
| name = Item Name ...
| image = ItemImage.png
| image = ItemImage.png ...
| imagesize = 180px <!-- Optional, defaults to 150px -->
...
| 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>

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