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
Undo revision 12283 by Fiend (talk)
Tag: Undo
Undo revision 12282 by Fiend (talk)
Tag: Undo
Line 1: Line 1:
--- a/Template:Item Infobox (Previous)
<!-- Template:Item Infobox (Custom Table Layout) -->
+++ b/Template:Item Infobox (Approach 1 Guess)
<includeonly>{| class="infobox" style="float:right; width: 280px; border: 1px solid #aaaaaa; background-color: #f9f9f9; margin-left: 1em; font-size: 90%;"
@@ -6,10 +6,8 @@
|+ style="font-size: 1.2em; font-weight: bold; padding: 0.2em 0.4em;" | {{{name|{{PAGENAME}}}}} <!-- Title -->
| header1 = {{#if:{{{name|}}}|{{Infobox title icon|{{{name|{{PAGENAME}}}}}|icon={{{icon|}}} }} }}
|- <!-- Main row for text and image -->
| rowclass1 = infobox-title <!-- Assign class to title row -->
| style="padding: 0.3em 0.6em; vertical-align: top;" | <!-- Left cell for text data -->
  {{#if:{{{introduced|}}}|'''Introduced:''' {{{introduced}}}<br />}}
  {{#if:{{{type|}}}|'''Type:''' {{{type}}}<br />}}
  {{#if:{{{category|}}}|'''Category:''' {{{category}}}<br />}}
  {{#if:{{{vendor|}}}|'''Vendor:''' {{{vendor}}}<br />}}
  {{#if:{{{dyeable|}}}|'''Dyeable:''' {{{dyeable}}}<br />}}
  {{#if:{{{access|}}}|'''Access:''' {{{access}}}<br />}}
  {{#if:{{{use_location|}}}|'''Use Location:''' {{{use_location}}}<br />}}
  <!-- Add more fields here using the same format -->
| style="padding: 0.3em 0.6em; vertical-align: top; text-align:center;" | <!-- Right cell for image -->
  {{#if:{{{image|}}}|[[File:{{{image}}}|center|{{{imagesize|220px}}}]]|[[File:Placeholderv2.png|center|220px]]}}
|}
</includeonly><!--


-<!-- Image Row -->
Optional Short description
-| image1 = {{#if:{{{image|}}}|[[File:{{{image}}}|{{{imagesize|200px}}}]]|[[File:Placeholderv2.png|200px]]}} <!-- Image content -->
--><includeonly>{{Short description|Game item in Outlands}}</includeonly><!--
-| imagerowclass1 = infobox-image <!-- Assign class to image row -->
-| imagerowstyle1 = text-align:center; <!-- ADDED: Attempt to apply centering style to the image row -->
+<!-- Image Parameter -->
+| image = {{#if:{{{image|}}}|[[File:{{{image}}}|{{{imagesize|200px}}}]]|[[File:Placeholderv2.png|200px]]}} <!-- Try 'image' instead of 'image1' -->


<!-- Data Rows STARTING FROM label2/data2 -->
Categorization
| label2 = Introduced
--><noinclude>
[[Category:Infobox Templates]]
[[Category:Item Templates]]
 
== Usage ==
This template creates an infobox with the image floated right and text to the left.
 
<pre>
{{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
}}
</pre>
</noinclude>

Revision as of 06:37, 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