Jump to content

Template:Infobox location: 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|}}}{{{map|}}}{{{type|}}}{{{level|}}}{{{location|}}}{{{inhabitants|}}}|<table class="infobox">
<title source="title"/>
{{#if:{{{title|}}}|<caption class="infobox-title">{{{title|}}}</caption>|}}
<image source="image"><caption source="imagecaption"/></image>
{{#if:{{{image|}}}|<tr>
<image source="map"><caption source="mapcaption"/></image>
<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="type"><label>Type</label></data>
</tr>|}}
<data source="level"><label>Level</label></data>
{{#if:{{{map|}}}|<tr>
<data source="location"><label>Location</label></data>
<td class="infobox-image" colspan="2">{{#ifeq:{{#sub:{{{map|}}}|0|1}}|[|{{{map|}}}|[[{{#ifeq:{{lc:{{#sub:{{{map|}}}|0|5}}}}|file:||{{#ifeq:{{lc:{{#sub:{{{map|}}}|0|6}}}}|image:||File:}}}}{{{map|}}}|frameless|220px]]}}{{#if:{{{mapcaption|}}}|<div class="infobox-caption">{{{mapcaption|}}}</div>|}}</td>
<data source="inhabitants"><label>Inhabitants</label></data>
</tr>|}}
</infobox><includeonly>[[Category:Locations]]</includeonly><noinclude>{{Documentation}}</noinclude>
{{#if:{{{type|}}}|<tr>
<th class="infobox-label" scope="row">Type</th>
<td class="infobox-data">{{{type|}}}</td>
</tr>|}}
{{#if:{{{level|}}}|<tr>
<th class="infobox-label" scope="row">Level</th>
<td class="infobox-data">{{{level|}}}</td>
</tr>|}}
{{#if:{{{location|}}}|<tr>
<th class="infobox-label" scope="row">Location</th>
<td class="infobox-data">{{{location|}}}</td>
</tr>|}}
{{#if:{{{inhabitants|}}}|<tr>
<th class="infobox-label" scope="row">Inhabitants</th>
<td class="infobox-data">{{{inhabitants|}}}</td>
</tr>|}}
</table>|}}<includeonly>[[Category:Locations]]</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.