Jump to content

Template:Infobox item: Difference between revisions

From wiki58
m 1 revision: Updates made for portability
 
m Remove generated paragraph spacing inside infobox cells; retain Wikipedia CSS
 
(One intermediate revision by the same user not shown)
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">{{#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|}}}|<div class="infobox-caption">{{{imagecaption|}}}</div>|}}</td>
<data source="effects"><label>Effects</label></data>
</tr>|}}
<data source="source"><label>Source</label></data>
{{#if:{{{type|}}}|<tr>
<data source="buy"><label>Cost to buy</label></data>
<th class="infobox-label" scope="row">Type</th>
<data source="sell"><label>Cost to sell</label></data>
<td class="infobox-data">{{{type|}}}</td>
</infobox><includeonly>[[Category:Items]]</includeonly><noinclude>{{Documentation}}</noinclude>
</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>

Latest revision as of 18:53, 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.