Jump to content

Template:Infobox location: Difference between revisions

From Elysium D&D
Olivinism (talk | contribs)
No edit summary
mNo edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{Infobox
<includeonly><templatestyles src="Template:Infobox/styles.css" />
| class     = infobox-location
{| class="wikitable infobox" style="width:20%;"
| title    = {{{name|{{PAGENAME}}}}}
! colspan="4" | {{{name|{{PAGENAME}}}}}
| image    = {{{image|}}}
{{#if:{{{image|}}}|
| caption  = {{{image_caption|}}}
{{!}}-
| subtitle  = {{{title|}}}
{{!}} colspan="4" style="text-align:center" {{!}} [[File:{{{image}}}{{!}}frameless]]<br/><span style="font-size:87%">{{{image_caption|}}}</span>
| label1  = Alternate Names        | data1  = {{{alternatenames|}}}
}}
| label2  = Region       | data2  = {{{region|}}}
{{#if:{{{type|}}}|
| header3 = Inhabitants
{{!}}-
| label4  = Faction      | data4  = {{{faction|}}}
! colspan="2" {{!}} Type
| label5  = Species   | data5  = {{{species|}}}
{{!}} colspan="2" {{!}} {{{type}}}
| label6  = Population | data6  = {{{population|}}}
}}
| header7 = Meta
{{#if:{{{region|}}}|
| label8 = Campaign   | data8 = {{{campaign|}}}
{{!}}-
| label9 = Status     | data9 = {{{status|}}}
! colspan="2" {{!}} Region
}}</includeonly><noinclude>
{{!}} colspan="2" {{!}} {{{region}}}
Location infobox. Built on [[Template:Infobox]].
}}
{{#if:{{{faction|}}}{{{species|}}}{{{population|}}}|
{{!}}-
! colspan="4" {{!}} Inhabitants
}}
{{#if:{{{faction|}}}|
{{!}}-
! colspan="2" {{!}} Factions
{{!}} colspan="2" {{!}} {{{faction}}}
}}
{{#if:{{{species|}}}|
{{!}}-
! colspan="2" {{!}} Species
{{!}} colspan="2" {{!}} {{{species}}}
}}
{{#if:{{{population|}}}|
{{!}}-
! colspan="2" {{!}} Population
{{!}} colspan="2" {{!}} {{{population}}}
}}
{{#if:{{{campaign|}}}{{{status|}}}|
{{!}}-
! colspan="4" {{!}} Meta
}}
{{#if:{{{campaign|}}}|
{{!}}-
! colspan="2" {{!}} Campaign
{{!}} colspan="2" {{!}} {{{campaign}}}
}}
{{#if:{{{status|}}}|
{{!}}-
! colspan="2" {{!}} Status
{{!}} colspan="2" {{!}} {{{status}}}
}}
|}
{{#if:{{{nocat|}}}||[[Category:Locations]]}}</includeonly><noinclude>
Character infobox.
 
Base variables: ''name'', ''image'', ''image_caption'', ''type'', ''region''.
 
Inhabitants variables: ''faction'', ''species'', ''population''.
 
Meta variables: ''campaign'', ''status''.
 
Function variables: ''nocat''.
 
The Locations category is added whenever the template is used. If ''nocat'' is set (e.g. <nowiki>|nocat=1</nowiki>), no category is added.
 
==Example==
{{Infobox_location
| name = Baldur's Gate
| type = City
| region = The Sword Coast, Faerun
| population = 3,000,000
| faction = [[Zhentarim|Zhentarim]], [[Order of the Gauntlet|Order of the Gauntlet]], [[Flaming Fist|Flaming Fist]]
| species = Humans, elves, dwarves, warforged
| campaign =[[Heart of Gold]]
| status = Burning as we speak
| nocat = 1
}}
<pre>
{{Infobox_location
| name = Baldur's Gate
| type = City
| region = The Sword Coast, Faerun
| population = 3,000,000
| faction = [[Zhentarim|]], [[Order of the Gauntlet|]], [[Flaming Fist]]
| species = Humans, elves, dwarves, warforged
| campaign =[[Heart of Gold]]
| status = Burning as we speak
| nocat = 1
}}
</pre>
[[Category:Infobox Templates]]
</noinclude>
</noinclude>

Latest revision as of 22:46, 10 August 2026

Character infobox.

Base variables: name, image, image_caption, type, region.

Inhabitants variables: faction, species, population.

Meta variables: campaign, status.

Function variables: nocat.

The Locations category is added whenever the template is used. If nocat is set (e.g. |nocat=1), no category is added.

Example

Baldur's Gate
Type City
Region The Sword Coast, Faerun
Inhabitants
Factions Zhentarim, Order of the Gauntlet, Flaming Fist
Species Humans, elves, dwarves, warforged
Population 3,000,000
Meta
Campaign Heart of Gold
Status Burning as we speak
{{Infobox_location
| name = Baldur's Gate
| type = City
| region = The Sword Coast, Faerun
| population = 3,000,000
| faction = [[Zhentarim|]], [[Order of the Gauntlet|]], [[Flaming Fist]]
| species = Humans, elves, dwarves, warforged
| campaign =[[Heart of Gold]]
| status = Burning as we speak
| nocat = 1
}}