Difference between revisions of "Template:Infobox location"

From PZwiki
Jump to: navigation, search
m
(added map param and changed image(s) to data params.)
Line 2: Line 2:
 
|bodystyle  = width:350px; -moz-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; -webkit-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}};
 
|bodystyle  = width:350px; -moz-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; -webkit-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}};
 
| above      = <div style="background: #{{Infobox nc|{{{name_colour|}}}}}; padding: 5px; font-weight: bold; text-align: center; font-size: 120%; color:#{{Infobox nc|{{{name_text_colour|}}}|text}};"><span class="fn">{{{name|{{PAGENAME}}}}}</span></div>
 
| above      = <div style="background: #{{Infobox nc|{{{name_colour|}}}}}; padding: 5px; font-weight: bold; text-align: center; font-size: 120%; color:#{{Infobox nc|{{{name_text_colour|}}}|text}};"><span class="fn">{{{name|{{PAGENAME}}}}}</span></div>
| image    = {{#if: {{{logo|}}}|[[File:{{{logo}}}|{{{logo_size|294px}}}|link={{filepath:{{{logo}}}}}]]}}
 
| caption    = {{#if: {{{logo_caption|}}}|''{{{logo_caption|}}}''}}
 
| image2      = {{#if: {{{image|}}}|[[File:{{{image}}}|{{{image_size|294px}}}]]}}
 
| caption2    = {{#if: {{{image_caption|}}}|''{{{image_caption|}}}''}}
 
  
 
| imagestyle = padding:10px;
 
| imagestyle = padding:10px;
Line 12: Line 8:
 
| datastyle = width:50%;
 
| datastyle = width:50%;
  
| header1   = {{#if:{{{type|}}}{{{mayor|}}}{{{founder|}}}{{{pop|}}}{{{established|}}}|General}}
+
| data1      = {{#if: {{{logo|}}}|[[File:{{{logo}}}{{#if:{{{logo_size|}}}|{{!}}{{{logo_size|294px}}}|{{!}}294px}}]]}}
 +
| data2   = {{#if: {{{logo_caption|}}}|<span style="font-size:90%">''{{{logo_caption|}}}''</span>}}
 +
| data3    = {{#if: {{{image|}}}|[[File:{{{image}}}{{#if:{{{image_size|}}}|{{!}}{{{image_size|294px}}}|{{!}}294px}}]]}}
 +
| data4  = {{#if: {{{image_caption|}}}|<span style="font-size:90%">''{{{image_caption|}}}''</span>}}
  
| label2    = Type
+
| header5    = {{#if:{{{type|}}}{{{mayor|}}}{{{founder|}}}{{{pop|}}}{{{established|}}}|General}}
| data2      = {{{type|}}}
 
  
| label3     = Mayor
+
| label6     = Type
| data3     = {{{mayor|}}}
+
| data6     = {{{type|}}}
  
| label4     = Pop
+
| label7     = Mayor
| data4     = {{{pop|}}}
+
| data7     = {{{mayor|}}}
  
| label5     = Established
+
| label8     = Population
| data5     = {{{established|}}}
+
| data8     = {{{pop|}}}
  
| label6  = Motto
+
| label9    = Established
| data6    = {{{motto|}}}
+
| data9      = {{{established|}}}
  
| header7    = {{#if:{{{state|}}}{{{country|}}}{{{coordinates|}}}|Location}}
+
| label10  = Motto
 +
| data10    = {{{motto|}}}
  
| label8    = State
+
| header11    = {{#if:{{{state|}}}{{{country|}}}{{{coordinates|}}}|Location}}
| data8      = {{{state|}}}
 
  
| label9     = Country
+
| label12     = State
| data9     = {{{country|}}}
+
| data12     = {{{state|}}}
  
| label10     = Coordinates
+
| label13    = Country
| data10     = {{#if:{{{coordinates|}}}|[[File:Geographylogo.png{{!}}26px{{!}}link=https://map.projectzomboid.com/?#{{{coordinates}}}{{!}}Show location on an interactive map]]<span class="plainlinks">[https://map.projectzomboid.com/?#{{{coordinates}}} {{{coordinates}}}]</span>}}
+
| data13      = {{{country|}}}
 +
 
 +
| label14     = Coordinates
 +
| data14     = {{#if:{{{coordinates|}}}|[[File:Geographylogo.png{{!}}26px{{!}}link=https://map.projectzomboid.com/?#{{{coordinates}}}{{!}}Show location on an interactive map]]<span class="plainlinks">[https://map.projectzomboid.com/?#{{{coordinates}}} {{{coordinates}}}]</span>}}
 +
 
 +
| data15      = {{#if:{{{map|}}}|
 +
{{{!}} class="mw-collapsible mw-collapsed" style="width:100%" cellspacing=0px data-expandtext=▼ data-collapsetext=▲
 +
{{!}}- style="vertical-align:center;"
 +
{{!}} style="background-color: #{{Infobox nc|{{{name_colour|}}}}}; font-weight: bold; color: rgba(0, 0, 0, 0);" {{!}} <div style="height:24px; margin: -1px -2px; background-color:#{{Infobox nc|{{{name_colour|}}}}}; font-size:14px; color: #{{Infobox nc|{{{name_text_colour|}}}|text}};">  Map</div>
 +
{{!}}-
 +
{{!}} [[File:{{{map}}}|{{{map_size|294px}}}|link={{filepath:{{{map}}}}}]]{{#if: {{{map_caption|}}}|<br><span style="font-size:90%">''{{{map_caption|}}}''</span>}}
 +
{{!}}} }}
  
 
}}</includeonly><noinclude>{{Documentation}}[[Category:Infobox]]</noinclude>
 
}}</includeonly><noinclude>{{Documentation}}[[Category:Infobox]]</noinclude>

Revision as of 15:06, 10 September 2019

[view] [edit] [history] [purge] Template documentation
This template is used to create an infobox in an article about a location, such as a city or town.

Usage

To use this template in an article, copy the template below, then paste the template into an article.

All parameters are optional – those you do not populate with data will not show up in the infobox when the article is saved.

It is strongly advised to only include variables that are relevant to the specific item in question, i.e. parameters that do not display as false or 0.

name
logo_size
logo_caption
image_size
image_caption
General
Type type
Mayor mayor
Population pop
Established established
Motto motto
Location
Start start
End end
State state
Country country
Coordinates Show location on an interactive map10880x10031
  Map
map_size
map_caption
{{infobox location
| name			= 
| name_colour		= 
| name_text_colour	= 
| logo			= 
| logo_size		= 
| logo_caption		= 
| image			= 
| image_size		= 
| image_caption		= 
| type			= 
| mayor			= 
| pop			= 
| established		= 
| motto			= 
| start			= 
| end			= 
| state			= 
| country		= 
| coordinates		= 
| map			= 
| map_size		= 
| map_caption		= 
}}

Parameters

Parameter Explanation
name Insert the name of the building
name_colour Insert the background colour for the name. Codes can be found at Template:Infobox nc.
name_text_colour Insert the text colour for the display name. Codes can be found at Template:Infobox nc.
logo Logo for the location, or a second image. Insert an image link in the form: Example.jpg
logo_size Set the size of the image. Default is 294px
logo_caption Insert a caption for the image.
image Image of the location. Insert an image link in the form: Example.jpg
image_size Set the size of the image. Default is 294px
image_caption Insert a caption for the image.
type The type of location it is, such as: city, town, etc.
mayor The name of the current mayor.
pop The current estimated population.
established The year the location was established in.
motto The location motto/taglines.
start The start area of the road/region.
end The end area of the road/region.
state The state the location is in.
country The country the location is in.
coordinates Insert the coordinates as they appear on: https://map.projectzomboid.com/. Go to the location on the map in the URL, press "Map Coordinates" on the left sidebar, copy the "Coords:" being sure not to include any spaces.
Example:| coordinates = 10880x10031.
map Map of the location. Insert an image link in the form: Example.jpg.
map_size Set the size of the map image. Default is 294px
map_caption Insert a caption for the image.
Documentation transcluded from Template:Infobox location/doc.
Editors can experiment in this template's sandbox (create)