Misplaced Pages

Template:Infobox Switzerland municipality: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →
Revision as of 01:59, 18 September 2020 view sourceJonesey95 (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, Mass message senders, Template editors378,696 edits update code for "former" municipality_type← Previous edit Revision as of 10:54, 8 October 2020 view source Anthony Appleyard (talk | contribs)209,150 editsm Anthony Appleyard moved page Template:Infobox Swiss municipality to Template:Infobox Switzerland municipality without leaving a redirect: Requested by TerraCyprus at WP:RM/TR: use noun, see Category:Switzerland data templates, Category:Country data templates of Switzerland, Category:Template:Metadata Population (e.g. Template:Switzerland metadata Wikidata), Template:Switzerland topicsNext edit →
(No difference)

Revision as of 10:54, 8 October 2020

{{{subject_name}}}
Municipality of Switzerland
CountrySwitzerland
Canton{{{canton}}}
District{{{district}}}
Time zoneUTC+01:00 (Central European Time)
 • Summer (DST)UTC+02:00 (Central European Summer Time)
Websitewebsite missing
Template documentation[view] [edit] [history] [purge]
This template is a customized wrapper for {{Infobox settlement}} and as such included in Category:Templates calling Infobox settlement. Any field from {{Infobox settlement}} can work so long as it is added to this template first. It will also emit the same hCard and Geo microformats as {{Infobox settlement}}. Questions? Just ask here or over at Template talk:Infobox settlement.
WarningThis template is used on approximately 2,900 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.

This is the infobox for articles about specific municipalities of Switzerland.

For a sample use, see Aarau.

Tests for updates

Before updating the infobox, please try the updates first on the test version at

Usage

{{{subject_name}}}
Municipality of Switzerland
]{{{snow_imagecaption}}}
]Coat of arms
Lua error in Module:Location_map at line 526: Unable to find the specified location map definition: "Module:Location map/data/Canton of &" does not exist.
Coordinates: {{{coordinates}}}
CountrySwitzerland
Canton]
District{{{district}}}
Municipality{{{within_municipality}}}
Government
 • Mayor{{{mayor_title}}}]
{{{mayor}}} {{{mayor_party}}}
(as of {{{mayor_asof}}})
Area
 • Total{{{area}}} km (Formatting error: invalid input when rounding sq mi)
Elevation{{{elevation}}} m (Formatting error: invalid input when rounding ft)
Highest elevation{{{highest_m}}} m (Formatting error: invalid input when rounding ft)
Lowest elevation{{{lowest_m}}} m (Formatting error: invalid input when rounding ft)
Population
 • Total{{{population}}}
Demonym{{{demonym}}}
Time zoneUTC+01:00 (Central European Time)
 • Summer (DST)UTC+02:00 (Central European Summer Time)
Postal code(s){{{postal_code}}}
SFOS number{{{municipality_code}}}
Localities{{{places}}}
Surrounded by{{{neighboring_municipalities}}}
Website{{{website}}}
SFSO statistics

Blank template

NOTE: population figures, year and month of the population estimate and a population reference are now added automatically thanks to the templates from Category:Swiss populations data templates. For former municipalities (villages); use either the population from before the merger, N/A or leave the population field blank. The current list of recognized municipalities can be found at the Swiss Federal Statistical Office in either German or French. Look for the Excel file called Amtliches Gemeindeverzeichnis der Schweiz - MS-Excel Version (in German) or Répertoire officiel des communes de Suisse - Version MS-Excel (in French).

NOTE: area is added automatically from Template:Switzerland area data. The area field is still retained in the template as a backup in case the template returns an error. Editing the area will have no effect unless the SFOS number is incorrect or the municipality_type is set to former.

{{Infobox Switzerland municipality
| subject_name               = <!-- English name of the municipality -->
| municipality_type          = <!-- use "former" for municipalities that were merged and no longer exist *1 -->
| imagepath_flag             = <!-- flag of the municipality, "File:" is included automatically. -->
| imagepath_coa              = <!-- coat of arms of the municipality, "File:" is included automatically. -->
| pixel_coa                  =
| image_photo                = <!-- A picture of the municipality, "File:" is included automatically. -->
| image_caption              = <!-- A caption describing the photo -->
| snow_image                 = <!-- A snow-covered photo of the municipality that will replace the main one for the first four months of the year -->
| snow_imagecaption          = <!-- A caption describing the snowy picture, will be shown along with it in from January to April -->
| coordinates                = <!-- Latitude and longitude. Use {{Coord}}. -->
| position                   = <!-- "left" moves the label in the locator map to the left. Useful for cities in the east (e.g. Poschiavo) -->
| canton                     = <!-- English name of the canton without "Canton of" -->
| district                   = <!-- Needs to be linked; if the canton is not subdivided in districts just write "n.a." -->
| within_municipality        = <!-- For villages and former municipalities, to specify which municipality they're part of -->
| mayor                      =
| mayor_asof                 =
| mayor_party                =
| mayor_title                =
| list_of_mayors             =
| area                       = <!-- Used if the municipality_code is incorrect, no longer valid or municipality_type is former.  Area, in km2. XXX.XX (no commas or other text) -->
| elevation                  = <!-- In m (no commas or other text) -->
| elevation_description      =
| highest                    = <!-- Highest point in the municipality -->
| highest_m                  = <!-- In m (no commas or other text) -->
| lowest                     = <!-- Lowest point in the municipality -->
| lowest_m                   = <!-- In m (no commas or other text) -->
| population                 = <!-- This parameter must be here to create the POPULATION field in the infobox. However, it is only used if the municipality_code is incorrect, no longer valid or municipality_type is "former". -->
| populationof               = <!-- Used if the municipality_code is incorrect, no longer valid or municipality_type is "former".-->
| demonym                    =
| postal_code                = <!-- Postal code(s) assigned to the town. -->
| municipality_code          = <!-- The four-digit SFOS number. Used to retrieve population figures and to link SFOS statistics, plus additional statistics for a number of cantons *3 -->
| iso-code-region      = <!-- ISO 3166-2:CH code, e.g. "CH-SG" for St. Gallen -->
| places                     = <!-- a list of villages and other places within the municipality, particularly useful for municipalities created through mergers -->
| neighboring_municipalities =
| website                    = <!-- e.g. www.rapperswil-jona.ch – if none is specified the template will link "subject_name.ch", which usually works --> 
}}
  • *1: When the parameter value is "former", population and website information are not shown.
  • *2: if available, a map corresponding to "Karte Gemeinde 'subject_name' 20XX.png", where XX is a year between 07 and 12, will be added automatically.
  • *3: additional statistics are available for municipalities in Canton of Lucerne, Canton of Neuchatel, Ticino, Vaud.

Errors

Any articles with errors caused by incorrect information in the infobox will appear in Category:Swiss populations data templates/Failure.

Yearly updates

This template draws data from several sources. These data include the SFOS numbers, population and area. Some of these values will change on a yearly basis.

Template:Switzerland area data check Arealstatistik Standard - Kantonsdaten nach 4 Hauptbereichen (Area statistics) for updates
Template:SFOS2Municipality check Amtliches Gemeindeverzeichnis (Community Directory) for changes to SFOS numbers and mergers.
Category:Swiss populations data templates check Swiss Federal Statistical Office - STAT-TAB online database and update for each canton.

Fields

Many infoboxes have been converted from the German or the French language Misplaced Pages. The following table lists fields that are (or used to be) equivalent.

Field en: Field de: Field fr:
subject_name= NAME_ORT= or BILDPFAD_WAPPEN= nomcommune= or drapeaucommune=
(imagepath_flag=) BILDPFAD_Flagge= drapeaucommune=
(imagepath_coa=) BILDPFAD_WAPPEN= blasoncommune=
(municipality_type=) GEMEINDEART=
canton= KANTON= canton= or (lien_canton=|affichage_canton=)
district= (with ]) BEZIRK= (with ]) district= or (lien_district=|affichage_district=)
coordinates= BREITENGRAD=|LÄNGENGRAD= longitude=|latitude=
postal_code= PLZ= cp=
municipal_code= BFS= no_OFS=
population= EINWOHNER= habitants=
populationof= STAND_EINWOHNER=
(populationdensity=) densité=
area= FLÄCHE= superficie=
(area_magnitude=)
altitude= HÖHE= altitude=
mayor= (with ]) syndic/maire=
website= WEBSITE= siteweb=
places= localité=
neighboring_municipalities= communeslimitrophes=
(language=) langue=
demonym= nom/gentilé=

Fields with names listed in parentheses are not currently displayed in this template and might never be, but they are assigned a name to facilitate conversion from fr: and de:.

Conversions

From To
language field content field content
de BILDPFAD_WAPPEN= imagepath_coa=
de STAND_EINWOHNER= Dezember 2006 populationof= December 2006

Microformat

The HTML markup produced by this template includes an hCard microformat, which makes the place-name and location parsable by computers, either acting automatically to catalogue articles across Misplaced Pages, or via a browser tool operated by a person, to (for example) add the subject to an address book. Within the hCard is a Geo microformat, which additionally makes the coordinates (latitude & longitude) parsable, so that they can be, say, looked up on a map, or downloaded to a GPS unit. For more information about the use of microformats on Misplaced Pages, please see the microformat project.

Sub-templates

If the place or venue has "established", "founded", "opened" or similar dates, use {{start date}} for the earliest of those dates unless the date is before 1583 CE.

If it has a URL, use {{URL}}.

Please do not remove instances of these sub-templates.

Classes

hCard uses HTML classes including:

  • adr
  • agent
  • category
  • county-name
  • extended-address
  • fn
  • label
  • locality
  • nickname
  • note
  • org
  • region
  • street-address
  • uid
  • url
  • vcard

Geo is produced by calling {{coord}}, and uses HTML classes:

  • geo
  • latitude
  • longitude

Please do not rename or remove these classes nor collapse nested elements which use them.

Precision

When giving coordinates, please use an appropriate level of precision. Do not use {{coord}}'s |name= parameter.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Infobox Switzerland municipality in articles based on its TemplateData.

TemplateData for Infobox Switzerland municipality

Tracking categories

Hidden tracking/maintenance category implemented in main and supporting templates:

See also

Other languages

No description.

Template parameters

ParameterDescriptionTypeStatus
Subject namesubject_name

English name of the municipality.

Unknownoptional
Municipality typemunicipality_type

Use "former" for municipalities that were merged and no longer exist

Unknownoptional
Imageimage_photo

Photo of the location.

Unknownoptional
Image captionimage_caption

Caption for the image used. Should describe its relevance to the page.

Unknownoptional
Image sizeimagesize

Specified size of the image, in pixels. Upright is preferred to pixel specification for accessibility reasons.

Unknownoptional
Snow imagesnow_image

A snow-covered photo of the location that will replace the main one for the first four months of the year.

Unknownoptional
Snow image captionsnow_imagecaption

Caption for the snow image. Should describe its relevance to the page.

Unknownoptional
Snow image sizesnow_imagesize

Specified size of the image, in pixels. Upright is preferred to pixel specification for accessibility reasons.

Unknownoptional
Flag imageimagepath_flag

Flag of the municipality, "File:" is included automatically.

Unknownoptional
pixel_flagpixel_flag

no description

Unknownoptional
Coat of armsimagepath_coa

Coat of arms of the municipality, "File:" is included automatically.

Unknownoptional
pixel_coapixel_coa

no description

Unknownoptional
CoordinatesCoordinates

Latitude and longitude. Use {{Coord}}

Unknownoptional
Cantoncanton

English name of the canton, without "Canton of".

Unknownoptional
Label positionposition

"Left" moves the label in the locator map to the left. Useful for cities in the east (e.g. Poschiavo)

Unknownoptional
ISO Codeiso-code-region

ISO 3166-2:CH code

Example
e.g. "CH-SG" for St. Gallen
Unknownoptional
municipality_codemunicipality_code

no description

Unknownoptional
Population countpopulation

no description

Unknownoptional
coordinates_footnotescoordinates_footnotes

no description

Unknownoptional
districtdistrict

no description

Unknownoptional
Within municipalitywithin_municipality

For villages and former municipalities, to specify which municipality they're part of.

Unknownoptional
executive_nameexecutive_name

no description

Unknownoptional
executive_number_of_membersexecutive_number_of_members

no description

Unknownoptional
executive_members_listexecutive_members_list

no description

Unknownoptional
mayor_titlemayor_title

no description

Unknownoptional
list_of_mayorslist_of_mayors

no description

Unknownoptional
mayormayor

no description

Unknownoptional
mayor_partymayor_party

no description

Unknownoptional
mayor_asofmayor_asof

no description

Unknownoptional
parliament_nameparliament_name

no description

Unknownoptional
parliament_number_of_membersparliament_number_of_members

no description

Unknownoptional
parliament_sinceparliament_since

no description

Unknownoptional
parliament_presidents_listparliament_presidents_list

no description

Unknownoptional
Areaarea

Used if the municipality_code is incorrect, no longer valid or municipality_type is former. Area, in km2. XXX.XX (no commas or other text)

Unknownoptional
Area sourcearea_source

Source for the area.

Unknownoptional
elevationelevation

no description

Unknownoptional
altitudealtitude

no description

Unknownoptional
elevation_descriptionelevation_description

no description

Unknownoptional
altitude_descriptionaltitude_description

no description

Unknownoptional
Highest pointhighest

Highest point in the place

Unknownoptional
High point (metres)highest_m

Highest point in metres (no commas or other text)

Unknownoptional
Lowest pointlowest

Lowest point in the place

Unknownoptional
Lowest point (metres)lowest_m

Lowest point in metres (no commas or other text)

Unknownoptional
populationofpopulationof

no description

Unknownoptional
demonymdemonym

no description

Unknownoptional
demonymsdemonyms

no description

Unknownoptional
postal_codepostal_code

no description

Unknownoptional
placesplaces

no description

Unknownoptional
neighboring_municipalitiesneighboring_municipalities

no description

Unknownoptional
Twin townstwintowns

Any other places that have a twin or sister town agreement with it.

Unknownoptional
Websitewebsite

If the location has an official website.

Unknownoptional
popofyearpopofyear

no description

Unknownoptional
The above documentation is transcluded from Template:Infobox Switzerland municipality/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template. Categories:
Template:Infobox Switzerland municipality: Difference between revisions Add topic