Jump to content

Template:Infobox item: Difference between revisions

From wiki58
m 1 revision: Updates made for portability
 
Replace Fandom component markup with native Wikipedia classes; retain source parameters, content, and archived history
Line 1: Line 1:
<infobox>
{{#if:{{{title|}}}{{{image|}}}{{{type|}}}{{{effects|}}}{{{source|}}}{{{buy|}}}{{{sell|}}}|<table class="infobox">
<title source="title"/>
{{#if:{{{title|}}}|<caption class="infobox-title">{{{title|}}}</caption>|}}
<image source="image"><caption source="imagecaption"/></image>
{{#if:{{{image|}}}|<tr>
<data source="type"><label>Type</label></data>
<td class="infobox-image" colspan="2">
<data source="effects"><label>Effects</label></data>
{{#ifeq:{{#sub:{{{image|}}}|0|1}}|[|{{{image|}}}|[[{{#ifeq:{{lc:{{#sub:{{{image|}}}|0|5}}}}|file:||{{#ifeq:{{lc:{{#sub:{{{image|}}}|0|6}}}}|image:||File:}}}}{{{image|}}}|frameless|220px]]}}{{#if:{{{imagecaption|}}}|
<data source="source"><label>Source</label></data>
<div class="infobox-caption">
<data source="buy"><label>Cost to buy</label></data>
{{{imagecaption|}}}
<data source="sell"><label>Cost to sell</label></data>
</div>|}}
</infobox><includeonly>[[Category:Items]]</includeonly><noinclude>{{Documentation}}</noinclude>
</td>
</tr>|}}
{{#if:{{{type|}}}|<tr>
<th class="infobox-label" scope="row">
Type
</th>
<td class="infobox-data">
{{{type|}}}
</td>
</tr>|}}
{{#if:{{{effects|}}}|<tr>
<th class="infobox-label" scope="row">
Effects
</th>
<td class="infobox-data">
{{{effects|}}}
</td>
</tr>|}}
{{#if:{{{source|}}}|<tr>
<th class="infobox-label" scope="row">
Source
</th>
<td class="infobox-data">
{{{source|}}}
</td>
</tr>|}}
{{#if:{{{buy|}}}|<tr>
<th class="infobox-label" scope="row">
Cost to buy
</th>
<td class="infobox-data">
{{{buy|}}}
</td>
</tr>|}}
{{#if:{{{sell|}}}|<tr>
<th class="infobox-label" scope="row">
Cost to sell
</th>
<td class="infobox-data">
{{{sell|}}}
</td>
</tr>|}}
</table>|}}<includeonly>[[Category:Items]]</includeonly><noinclude>
Native MediaWiki infobox using locally mirrored Wikipedia styles. Image fields accept a bare filename, a <code>File:</code>-prefixed name, or complete <code><nowiki>[[File:…]]</nowiki></code> markup. Fields, defaults, and categories retain the imported template API.
 
{{Documentation}}</noinclude>

Revision as of 17:59, 11 November 2026

Native MediaWiki infobox using locally mirrored Wikipedia styles. Image fields accept a bare filename, a File:-prefixed name, or complete [[File:…]] markup. Fields, defaults, and categories retain the imported template API.