Jump to content

Template:Location Infobox: Difference between revisions

From The Petit Planet Wiki
this WILL need editing, as it's copied wholesale from ZZZ wiki.
 
remove ID part.
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly><infobox>
<includeonly>{{#invoke:Infobox|main
<title source="title">
|kind = Location
<default>{{PAGENAME}}</default>
|sep = ,
</title>
|title = {{{title|{{{name|{{PAGENAME}}}}}}}}
<header name="secondary_title">{{{subtitle|}}}</header>
|subtitle = {{{subtitle|}}}
<image source="image">
|image = {{#if:{{{image|}}}|[[File:{{{image|}}}]]}}
<caption source="caption"/>
|images = {{#if:{{{images|}}}|{{Array|{{{images}}}|;|[[File:²{#explode:{item}¦:¦0}²]]|,|template=1}}}}
</image>
|tabs = {{#if:{{{images|}}}|{{Array|{{{images}}}|;|²{#explode:{item}¦:¦1}²|,|template=1}}}}
<data source="description">
|sections = Information, Description
<format>{{{description|}}}</format>
 
</data>
|Information_collapsible = Yes
<header>Details</header>
|Information = Type
<data source="type">
|Type = <!--
<label>Type</label>
-->{{#if:{{#explode:{{{type}}}|;|1}}|<!--
<format>[[{{{type}}}]]{{#if:{{{type2|}}}|<br />[[{{{type2}}}]]}}{{#if:{{{type3|}}}|<br />[[{{{type3}}}]]}}{{#if:{{{type4|}}}|<br />[[{{{type4}}}]]}}{{#if:{{{type5|}}}|<br />[[{{{type5}}}]]}}</format>
  -->{{Array|{{{type}}}|;|* [[{item}]]{newline} }}|<!--
</data>
  -->{{#if:{{{type|}}}|[[{{{type}}}]]}}<!--
<data source="group">
-->}}
<label>Group</label>
 
<format>[[{{{group}}}]]{{#if:{{{group2|}}}|<br />[[{{{group2}}}]]}}{{#if:{{{group3|}}}|<br />[[{{{group3}}}]]}}{{#if:{{{group4|}}}|<br />[[{{{group4}}}]]}}{{#if:{{{group5|}}}|<br />[[{{{group5}}}]]}}</format>
|Description_collapsible = Yes
</data>
|Description = DescriptionText
<data source="area">
|DescriptionText_wide = Yes
<label>Area(s)</label>
|DescriptionText = {{{description|}}}
<format>{{List Array|{{{area|}}}|links=1}}</format>
}}<!--
</data>
<data source="region">
<label>Region</label>
<format>[[{{{region|}}}]]</format>
</data>
<data source="city">
<label>City</label>
<format>[[{{{city|}}}]]</format>
</data>
<data source="connections">
<label>Connections</label>
<format>{{List Array|{{{connections|}}}|links=1}}</format>
</data>
<section>
<label>Map</label>
<image source="map">
<caption source="caption"/>
          </image>
</section>
</infobox>{{Namespace|main=[[Category:Locations]]<!--
Set page display title if title is different from page name
-->{{#ifeq:{{NAMESPACE}}||<!--
-->{{#if:{{{title|}}}{{{displaytitle|}}}|{{#ifeq:{{{PAGENAME}}}|{{{title}}}||{{#ifeq:{{lc:{{{displaytitle|}}}}}|no||{{DISPLAYTITLE:{{{displaytitle|{{{title}}}}}}|noreplace}}}}}}}}<!--
-->}}<!--


-->{{#if:{{{id|}}}|[[Category:Location|{{{id|}}}]]|[[Category:Location]][[Category:Locations Missing ID]]}}<!--
-->{{Namespace|main=<!--
-->[[Category:Locations]]<!--


-->{{#if:{{{type|}}}|<!--
-->{{#if:{{{type|}}}|<!--
-->{{#switch:{{{type}}}<!--
  -->{{Array|{{{type}}}|;|3=<!--
-->|District = [[Category:Districts]]<!--
    -->²{#switch:{item}<!--
-->|Point of Interest = [[Category:Points of Interest]]<!--
    -->¦Area = [[Category:Areas]]<!--
-->|Area = [[Category:Areas]]<!--
    -->¦Region = [[Category:Regions]]<!--
-->|Region = [[Category:Regions]]<!--
    -->¦Shop = [[Category:Shops]]<!--
-->|City = [[Category:Cities]]<!--
    -->¦Activity = [[Category:Activities]]<!--
-->|Shop = [[Category:Shops]]<!--
    -->¦#default = [[Category:{item}]]<!--
-->|Activity = [[Category:Activities]]<!--
    -->}²<!--
  -->|template=1}}<!--
-->}}<!--
-->}}<!--
-->|}}<!--
-->}}<!--
-->{{#if:{{{type2|}}}|[[Category:{{{type2|}}}]]}}<!--
--></includeonly><noinclude>{{Documentation|type=Infobox}}</noinclude>
-->{{#if:{{{type3|}}}|[[Category:{{{type3|}}}]]}}<!--
-->{{#if:{{{type4|}}}|[[Category:{{{type4|}}}]]}}<!--
-->{{#if:{{{type5|}}}|[[Category:{{{type5|}}}]]}}<!--
 
-->{{#if:{{{group|}}}|[[Category:{{{group|}}}]]}}<!--
-->{{#if:{{{group2|}}}|[[Category:{{{group2|}}}]]}}<!--
-->{{#if:{{{group3|}}}|[[Category:{{{group3|}}}]]}}<!--
-->{{#if:{{{group4|}}}|[[Category:{{{group4|}}}]]}}<!--
-->{{#if:{{{group5|}}}|[[Category:{{{group5|}}}]]}}<!--
 
-->{{#if:{{{area|}}}|<!---->{{Array|{{{area|}}}|;|[[Category:{item} Locations]]}}<!---->|}}<!--
-->{{#if:{{{region|}}}|[[Category:{{{region|}}} Locations]]|}}<!--
-->{{#if:{{{city|}}}|[[Category:{{{city|}}} Locations]]|}}<!--
 
-->{{#if:{{{district|}}}|[[Category:{{{district|}}} Locations]]}}<!--
-->{{#if:{{{district2|}}}|[[Category:{{{district2|}}} Locations]]}}<!--
-->}}</includeonly><noinclude>{{Documentation|type=Infobox}}</noinclude>

Latest revision as of 18:47, 3 June 2026

Template documentation
Note: parts of or the entire template might not be visible without values provided.
This template uses Module:Infobox, a script written in Lua.
This template uses CSS found at MediaWiki:Gadget-Infobox.css.

Infobox for Locations.

Syntax

[edit source]

{{Location Infobox
|title        = 
|subtitle     = 
|image        = if single image - no "File:"
|images       = more than one image delimited with ; - no "File:"
|type         = 
|description  = 
}}

Parameters

[edit source]
  • type: The type of location.
    • Acceptable types for auto-categorization: Area, Region, Shop, Activity

Examples

[edit source]
Loomix Mart
Type
{{Location Infobox
|name = Loomix Mart
|type = Shop
}}

Template Data

[edit source]

Infobox for Locations. Regions use Region Infobox. Domains use Domain Infobox.

Template parameters[Edit template data]

This template has custom formatting.

ParameterDescriptionTypeStatus
Titletitle

Location Title

Unknownoptional
Namename

Location Name

Unknownoptional
Subtitlesubtitle

Location subtitle

Unknownoptional
Imageimage

Image of the location.

Filesuggested
Image Listimages

If more than one image, insert with semicolon as delimiter

Unknownoptional
Typetype

Type of location. If multiple, delimit with semicolon (;)

Example
Area, Subarea, Point of Interest
Stringrequired
Descriptiondescription

Location Description

Unknownoptional