Difference between revisions of "Template:Infobox province or territory of Canada"

From blackwiki
Jump to navigation Jump to search
(fix a bug: add mineral, see Nova Scotia)
imported>Thomasmax911
 
(30 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{Tfm/dated|page=Infobox province or territory of Canada|otherpage=Infobox settlement|link=Wikipedia:Templates for discussion/Log/2020 September 12#Template:Infobox province or territory of Canada|type=sidebar|bigbox={{#invoke:Noinclude|noinclude|text=yes}}}}
 
 
{{Infobox settlement
 
{{Infobox settlement
| name                 = {{{Name|}}}
+
| name                   = {{{name|}}}
| settlement_type      = {{{Type|}}}
+
| other_name              = {{{other_name|}}}
| other_name          = {{{AlternateName|}}}
+
| settlement_type        = {{{settlement_type|}}}
| image_flag           = {{{Flag|}}}
+
| image_flag               = {{{image_flag|}}}
| flag_size             = 125px
+
| flag_size               = 125px
| flag_alt             = {{{FlagAlt|}}}
+
| flag_alt                 = {{{flag_alt|}}}
| image_shield         = {{{CoatOfArms|}}}
+
| image_shield           = {{{image_shield|}}}
| shield_size         = x85px
+
| shield_size             = x85px
| shield_alt           = {{{CoatOfArmsAlt|}}}
+
| shield_alt             = {{{shield_alt|}}}
| flag_link             = Flag of {{{Name|}}}
+
| shield_link             = Coat of arms of {{{name|}}}
| shield_link          = Coat of arms of {{{Name|}}}
+
| motto                   = {{{motto|}}}
| motto               = {{{Motto|}}}
+
| image_map              = {{#ifeq:{{{Label_map|}}}|yes||{{{image_map|}}}}}
| image_map1          = {{#ifeq:{{{Label_map|}}}|yes|{{Canada provinces map|Map={{{Map}}}|align=center|border=none|width=300px}} }}
+
| map_alt                = {{{map_alt|}}}
| image_map            = {{#ifeq:{{{Label_map|}}}|yes||{{{Map|}}}}}
+
| map_caption            = Map of Canada with {{{name|}}} highlighted
| map_alt              = {{{MapAlt|}}}
+
| image_map1              = {{#ifeq:{{{Label_map|}}}|yes|{{Canada provinces map|Map={{{image_map}}}|align=center|border=none|width=300px}} }}
| map_caption          = Map of Canada with {{{Name|}}} highlighted
+
| coordinates             = {{{coordinates|}}}
| coordinates         = {{{coordinates|}}}
+
| subdivision_type       = Country
| subdivision_type     = Country
+
| subdivision_name       = Canada
| subdivision_name     = Canada
+
| seat_type               = {{#if:{{{seat_type|}}}|{{{seat_type}}}|[[Capital_city|Capital]]}}
| seat_type           = Capital
+
| seat                   = {{{capital|}}}
| seat                 = {{{Capital|}}}
+
| seat1_type             = {{#if:{{{largest_city|}}}
| seat1_type           = {{#if:{{{LargestCity|}}}
 
 
  |[[List of the 100 largest municipalities in Canada by population|Largest city]]
 
  |[[List of the 100 largest municipalities in Canada by population|Largest city]]
 
  |[[List of the 100 largest metropolitan areas in Canada|Largest metro]]
 
  |[[List of the 100 largest metropolitan areas in Canada|Largest metro]]
 
  }}
 
  }}
| seat1               =  {{#if:{{{LargestCity|}}}
+
| seat1                   =  {{#if:{{{largest_city|}}}
  |{{{LargestCity|}}} {{#if:{{{LargestMetro|}}}|{{infobox|child=yes
+
  |{{{largest_city|}}} {{#if:{{{largest_metro|}}}|{{infobox|child=yes
 
   | rowclass1 = mergedrow
 
   | rowclass1 = mergedrow
 
   | label1 = [[List of the 100 largest metropolitan areas in Canada|Largest metro]]
 
   | label1 = [[List of the 100 largest metropolitan areas in Canada|Largest metro]]
   | data1 = {{{LargestMetro|}}}
+
   | data1 = {{{largest_metro|}}}
 
   }} }}
 
   }} }}
  |{{{LargestMetro|}}}
+
  |{{{largest_metro|}}}
 
  }}
 
  }}
| population_demonym   = {{{Demonym|}}} {{#if:{{{OfficialLang|}}}|
+
| population_demonym     = {{{population_demonym|}}} {{#if:{{{official_lang|}}}|
 
{{Infobox|child=yes
 
{{Infobox|child=yes
 
  | rowclass1 = mergedrow
 
  | rowclass1 = mergedrow
 
  | label1 = Official languages
 
  | label1 = Official languages
  | data1 = {{{OfficialLang|}}}
+
  | data1 = {{{official_lang|}}}
 
}}}}
 
}}}}
| government_footnotes = {{{government_footnotes|}}}
+
| government_footnotes   = {{{government_footnotes|}}}
| government_type     = {{{government_type|}}}
+
| government_type         = {{{government_type|}}}
| leader_title         = [[{{{ViceroyType}}} of {{{Name|}}}|{{nowrap|{{{ViceroyType}}}}}]]
+
| governing_body          = {{{governing_body|}}}
| leader_name         = {{{Viceroy|}}}
+
| leader_title           = [[{{{ViceroyType}}} of {{{name|}}}|{{nowrap|{{{ViceroyType}}}}}]]
| leader_title1       = [[Premier of {{{Name|}}}|Premier]]
+
| leader_name             = {{{Viceroy|}}}
| leader_name1         = {{#if:{{{Premier|}}}|{{{Premier}}} ({{{PremierParty}}})}} {{#if:{{{Legislature|}}}{{{HouseSeats|}}}{{{SenateSeats|}}}
+
| leader_title1           = [[Premier of {{{name|}}}|Premier]]
 +
| leader_name1           = {{#if:{{{Premier|}}}|{{{Premier}}} ({{{PremierParty}}})}} {{#if:{{{Legislature|}}}{{{HouseSeats|}}}{{{SenateSeats|}}}
 
   |{{infobox|child=yes
 
   |{{infobox|child=yes
 
   | label1 = Legislature
 
   | label1 = Legislature
Line 57: Line 56:
 
   | rowclass3 = mergedrow
 
   | rowclass3 = mergedrow
 
   | label4 = [[Senate of Canada|Senate seats]]
 
   | label4 = [[Senate of Canada|Senate seats]]
   | data4 = {{#if:{{{SenateSeats|}}}|[[List of {{{Name|}}} senators|{{{SenateSeats}}} of 105]] ({{#expr:{{{SenateSeats}}}*100/105 round 1}}%)}}
+
   | data4 = {{#if:{{{SenateSeats|}}}|[[List of {{{name|}}} senators|{{{SenateSeats}}} of 105]] ({{#expr:{{{SenateSeats}}}*100/105 round 1}}%)}}
 
   | rowclass4 = mergedrow
 
   | rowclass4 = mergedrow
 
   }}}}
 
   }}}}
| established_title   = [[Canadian Confederation#Joining Confederation|Confederation]]
+
| established_title       = [[Canadian Confederation#Joining Confederation|Confederation]]
| established_date     = {{#if:{{{AdmittanceDate|}}}|{{{AdmittanceDate}}} ({{{AdmittanceOrder}}})}}
+
| established_date       = {{#if:{{{AdmittanceDate|}}}|{{{AdmittanceDate}}} ({{{AdmittanceOrder}}})}}
| area_footnotes       = {{{area_footnotes|}}}
+
| area_footnotes         = {{{area_footnotes|}}}
| area_rank           = {{#if:{{{AreaRank|}}}|[[List of Canadian provinces and territories by area|Ranked {{{AreaRank}}}]]}}
+
| area_rank               = {{#if:{{{area_rank|}}}|[[List of Canadian provinces and territories by area|Ranked {{{area_rank}}}]]}}
| area_total_km2       = {{{TotalArea_km2|}}}
+
| area_total_km2         = {{{area_total_km2|}}}
| area_land_km2       = {{{LandArea_km2|}}}
+
| area_land_km2           = {{{area_land_km2|}}}
| area_water_km2       = {{{WaterArea_km2|}}}
+
| area_water_km2         = {{{area_water_km2|}}}
| area_water_percent   = {{#if:{{both|{{{WaterArea_km2|}}}|{{{TotalArea_km2|}}}}}|{{#expr:{{{WaterArea_km2}}}*100/{{{TotalArea_km2}}} round 1}} }}
+
| area_water_percent     = {{#if:{{both|{{{area_water_km2|}}}|{{{area_total_km2|}}}}}|{{#expr:{{{area_water_km2}}}*100/{{{area_total_km2}}} round 1}} }}
| area_note           = {{#if:{{{TotalArea_km2|}}}|{{#expr:{{{TotalArea_km2}}}*100/9984670 round 1}}% of Canada}}
+
| area_note               = {{#if:{{{area_total_km2|}}}|{{#expr:{{{area_total_km2}}}*100/9984670 round 1}}% of Canada}}
| population_footnotes = {{{population_footnotes|}}}
+
| population_footnotes   = {{{population_footnotes|}}}
| population_rank     = {{#if:{{{PopulationRank|}}}|[[Population of Canada by province and territory|Ranked {{{PopulationRank}}}]]}}
+
| population_rank         = {{#if:{{{population_rank|}}}|[[Population of Canada by province and territory|Ranked {{{population_rank}}}]]}}
| population_as_of     = {{{PopulationYear|}}}
+
| population_as_of       = {{{population_as_of|}}}
| population_total     = {{#if:{{{Population|{{#property:P1082}}}}}|{{{Population|{{#invoke:string|replace|{{#invoke:string|replace|{{#invoke:Wikidata|getValue|P1082|FETCH_WIKIDATA}}|([%d]), .*|%1|plain=false}}|±0|}}}}} {{{PopulationRef|}}} }}
+
| population_total       = {{#if:{{{population_total|{{#property:P1082}}}}}|{{{population_total|{{#invoke:string|replace|{{#invoke:string|replace|{{#invoke:Wikidata|getValue|P1082|FETCH_WIKIDATA}}|([%d]), .*|%1|plain=false}}|±0|}}}}} {{{population_ref|}}} }}
| population_est       = {{#if:{{{Population_est|}}}|{{{Population_est}}} {{{Pop_est_ref|}}}}}
+
| population_est         = {{#if:{{{population_est|}}}|{{{population_est}}} {{{pop_est_ref|}}}}}
| pop_est_as_of       = {{{Pop_est_as_of|}}}
+
| pop_est_as_of           = {{{pop_est_as_of|}}}
| population_density_km2 = {{#if:{{both|{{{Population|{{#property:P1082}}}}}|{{{LandArea_km2|}}}}}|{{#expr:{{formatnum:{{{Population|{{#invoke:string|replace|{{#invoke:string|replace|{{#invoke:Wikidata|getValue|P1082|FETCH_WIKIDATA}}|([%d]), .*|%1|plain=false}}|±0|}}}}}/{{{LandArea_km2|}}}|R}} round 2}} }}
+
| population_density_km2 = {{#if:{{both|{{{population_total|{{#property:P1082}}}}}|{{{area_land_km2|}}}}}|{{#expr:{{formatnum:{{{population_total|{{#invoke:string|replace|{{#invoke:string|replace|{{#invoke:Wikidata|getValue|P1082|FETCH_WIKIDATA}}|([%d]), .*|%1|plain=false}}|±0|}}}}}/{{{area_land_km2|}}}|R}} round 2}} }}
| demographics_type1   = {{#if:{{{GDP_rank|}}}{{{GDP_total|}}}{{{GDP_per_capita|}}}|[[Gross domestic product|GDP]]}}
+
| demographics_type1     = {{#if:{{{GDP_rank|}}}{{{GDP_total|}}}{{{GDP_per_capita|}}}|[[Gross domestic product|GDP]]}}
 
| demographics1_footnotes = {{{GDP_footnotes|}}}
 
| demographics1_footnotes = {{{GDP_footnotes|}}}
| demographics1_title1 = [[List of Canadian provinces and territories by gross domestic product|Rank]]
+
| demographics1_title1   = [[List of Canadian provinces and territories by gross domestic product|Rank]]
| demographics1_info1 = {{{GDP_rank|}}}
+
| demographics1_info1     = {{{GDP_rank|}}}
| demographics1_title2 = Total ({{{GDP_year}}})
+
| demographics1_title2   = Total ({{{GDP_year}}})
| demographics1_info2 = {{{GDP_total|}}}
+
| demographics1_info2     = {{{GDP_total|}}}
| demographics1_title3 = Per capita
+
| demographics1_title3   = Per capita
| demographics1_info3 = {{#if:{{{GDP_per_capita|}}}|{{{GDP_per_capita}}} ([[List of Canadian provinces and territories by gross domestic product|{{{GDP_per_capita_rank}}}]])}}
+
| demographics1_info3     = {{#if:{{{GDP_per_capita|}}}|{{{GDP_per_capita}}} ([[List of Canadian provinces and territories by gross domestic product|{{{GDP_per_capita_rank}}}]])}}
| demographics_type2   = {{#if:{{{HDI|}}}{{{HDI_rank|}}}|[[Human Development Index|HDI]]}}
+
| demographics_type2     = {{#if:{{{HDI|}}}{{{HDI_rank|}}}|[[Human Development Index|HDI]]}}
| demographics2_title1 = HDI ({{{HDI_year}}})
+
| demographics2_title1   = HDI ({{{HDI_year}}})
| demographics2_info1 = {{#if:{{{HDI|}}}|{{{HDI}}} ([[List of Canadian provinces and territories by Human Development Index|{{{HDI_rank}}}]])}}
+
| demographics2_info1     = {{#if:{{{HDI|}}}|{{{HDI}}} ([[List of Canadian provinces and territories by Human Development Index|{{{HDI_rank}}}]])}}
| postal_code_type     = [[Canadian subnational postal abbreviations|Postal abbr.]]
+
| postal_code_type       = [[Canadian subnational postal abbreviations|Postal abbr.]]
| postal_code         = {{{PostalAbbreviation|}}}
+
| postal_code             = {{{PostalAbbreviation|}}}
| iso_code             = {{#if:{{{ISOCode|}}}|[[ISO 3166-2:CA|{{{ISOCode}}}]]}}
+
| postal2_code_type      = [[Canadian postal code|Postal code prefix]]
| timezone_link       = {{{timezone_link|}}}
+
| postal2_code            = {{{PostalCodePrefix|}}}
| timezone            = {{{timezone|}}}{{{TimeZone|}}}
+
| iso_code               = {{#if:{{{iso_code|}}}|[[ISO 3166-2:CA|{{{iso_code}}}]]}}
| timezone1_location   = {{{timezone1_location|}}}
+
| timezone_link           = Time in Canada
| timezone1           = {{{timezone1|}}}
+
| timezone1_location     = {{{timezone1_location|}}}
| utc_offset1         = {{{utc_offset1|}}}
+
| timezone1               = {{{timezone1|}}}
| timezone1_DST       = {{{timezone1_DST|}}}
+
| utc_offset1             = {{{utc_offset1|}}}
| utc_offset1_DST     = {{{utc_offset1_DST|}}}
+
| timezone1_DST           = {{{timezone1_DST|}}}
| timezone2_location   = {{{timezone2_location|}}}
+
| utc_offset1_DST         = {{{utc_offset1_DST|}}}
| timezone2           = {{{timezone2|}}}
+
| timezone2_location     = {{{timezone2_location|}}}
| utc_offset2         = {{{utc_offset2|}}}
+
| timezone2               = {{{timezone2|}}}
| timezone2_DST       = {{{timezone2_DST|}}}
+
| utc_offset2             = {{{utc_offset2|}}}
| utc_offset2_DST     = {{{utc_offset2_DST|}}}
+
| timezone2_DST           = {{{timezone2_DST|}}}
| area_code_type      = [[Canadian postal code|Postal code prefix]]
+
| utc_offset2_DST         = {{{utc_offset2_DST|}}}
| area_code            = {{{PostalCodePrefix|}}}
+
| timezone3_location      = {{{timezone3_location|}}}
| website              = {{#if:{{{Website|}}}|{{URL|1={{{Website}}}}}}}
+
| timezone3              = {{{timezone3|}}}
| footnotes            = Rankings include all [[Provinces and territories of Canada|provinces and territories]]
+
| utc_offset3            = {{{utc_offset3|}}}
| module               = {{#if:{{{Tree|}}}{{{Bird|}}}{{{Flower|}}}|
+
| timezone3_DST          = {{{timezone3_DST|}}}
{{Infobox region symbols
+
| utc_offset3_DST        = {{{utc_offset3_DST|}}}
| embedded = Yes
+
| timezone4_location      = {{{timezone4_location|}}}
| tree    = {{{Tree|}}}
+
| timezone4               = {{{timezone4|}}}
| bird    = {{{Bird|}}}
+
| utc_offset4            = {{{utc_offset4|}}}
| flower    = {{{Flower|}}}
+
| timezone4_DST          = {{{timezone4_DST|}}}
| mineral  = {{{Mineral|}}}
+
| utc_offset4_DST        = {{{utc_offset4_DST|}}}
}}}}
+
| blank_name_sec1        = Flower
 +
| blank_info_sec1        = {{{flower|}}}
 +
| blank1_name_sec1        = Tree
 +
| blank1_info_sec1        = {{{tree|}}}
 +
| blank2_name_sec1        = Bird
 +
| blank2_info_sec1        = {{{bird|}}}
 +
| footnotes              = Rankings include all [[Provinces and territories of Canada|provinces and territories]]
 
}}<noinclude>
 
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 09:24, 25 December 2020

Template:Tfm/dated

[[Category:Template:Pagetype with short description]]

Script error: No such module "If empty".
CountryCanada
Population
 • TotalScript error: No such module "Wikidata".
Script error: No such module "If empty".
Script error: No such module "If empty".
Rankings include all provinces and territories

[[Category:Infobox templates|Template:Remove first word]]

Template documentation[view] [edit] [history] [purge]

Template:Uses infobox settlement Template:Uses Wikidata

Usage

{{Infobox province or territory of Canada
| name                    = 
| settlement_type         =
| other_name              = 
| image_flag              = 
| flag_alt                = 
| image_shield            = 
| shield_alt              = 
| motto                   = 
| Label_map               = 
| image_map               =
| map_alt                 = 
| coordinates             = 
| capital                 = 
| largest_city            = 
| largest_metro           = 
| official_lang            = 
| government_footnotes    = 
| ViceroyType             = 
| Viceroy                 = 
| Premier                 = 
| PremierParty            = 
| Legislature             = 
| HouseSeats              = 
| SenateSeats             = 
| AdmittanceDate          = 
| AdmittanceOrder         = 
| area_footnotes          = 
| area_rank               = 
| area_total_km2          = 
| area_land_km2           = 
| area_water_km2          = 
| population_footnotes    = 
| population_rank         = 
| population_as_of        = 
| population_total        = <!-- 2011 StatCan federal census population only per [[WP:CANPOP]]. Do not update until 2016 census population released on Feb-8/17. -->
| population_ref          =
| population_est          = <!-- Latest StatCan quarterly estimate only. -->
| pop_est_as_of           =
| pop_est_ref             =  
| DensityYear             = 
| population_demonym      = 
| GDP_footnotes           = 
| GDP_rank                = 
| GDP_year                = 
| GDP_total               = 
| GDP_per_capita          = 
| GDP_per_capita_rank     = 
| HDI_year                =
| HDI                     =
| HDI_rank                =
| timezone_link           = 
| timezone1               = 
| timezone1_location      = 
| timezone1               = 
| utc_offset1             = 
| timezone1_DST           = 
| utc_offset1_DST         = 
| timezone2_location      = 
| timezone2               = 
| utc_offset2             = 
| timezone2_DST           = 
| utc_offset2_DST         = 
| timezone3_location      = 
| timezone3               = 
| utc_offset3             = 
| timezone3_DST           = 
| utc_offset3_DST         = 
| timezone4_location      = 
| timezone4               = 
| utc_offset4             = 
| timezone4_DST           = 
| utc_offset4_DST         = 
| PostalAbbreviation      = 
| PostalCodePrefix         = 
| iso_code                = 
| website                 = 
| flower                  = 
| tree                    = 
| bird                    = 
}}

Microformat

Template:UF-hcard-geo