Difference between revisions of "Template:Infobox province or territory of Canada"
Jump to navigation
Jump to search
(format : indentions) |
(format : variable names) |
||
| 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}}}} | {{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 = {{#if:{{{ | + | | name = {{#if:{{{name|}}}|{{{name|}}}|{{PAGENAMEBASE}}}} |
| − | | settlement_type = {{{ | + | | settlement_type = {{{type|}}} |
| − | | other_name = {{{ | + | | other_name = {{{alternateName|}}} |
| − | | image_flag = {{{ | + | | image_flag = {{{flag|}}} |
| flag_size = 125px | | flag_size = 125px | ||
| − | | flag_alt = {{{ | + | | flag_alt = {{{flagAlt|}}} |
| − | | image_shield = {{{ | + | | image_shield = {{{coatOfArms|}}} |
| shield_size = x85px | | shield_size = x85px | ||
| − | | shield_alt = {{{ | + | | shield_alt = {{{coatOfArmsAlt|}}} |
| − | | flag_link = Flag of {{#if:{{{ | + | | flag_link = Flag of {{#if:{{{name|}}}|{{{name|}}}|{{PAGENAMEBASE}}}} |
| − | | shield_link = Coat of arms of {{#if:{{{ | + | | shield_link = Coat of arms of {{#if:{{{name|}}}|{{{name|}}}|{{PAGENAMEBASE}}}} |
| motto = {{{Motto|}}} | | motto = {{{Motto|}}} | ||
| − | | image_map1 = {{#ifeq:{{{Label_map|}}}|yes|{{Canada provinces map| | + | | image_map1 = {{#ifeq:{{{Label_map|}}}|yes|{{Canada provinces map|map={{{map}}}|align=center|border=none|width=300px}} }} |
| − | | image_map = {{#ifeq:{{{Label_map|}}}|yes||{{{ | + | | image_map = {{#ifeq:{{{Label_map|}}}|yes||{{{map|}}}}} |
| − | | map_alt = {{{ | + | | map_alt = {{{mapAlt|}}} |
| − | | map_caption = Map of Canada with {{#if:{{{ | + | | map_caption = Map of Canada with {{#if:{{{name|}}}|{{{name|}}}|{{PAGENAME}}}} highlighted |
| coordinates = {{{coordinates|}}} | | coordinates = {{{coordinates|}}} | ||
| subdivision_type = Country | | subdivision_type = Country | ||
| subdivision_name = Canada | | subdivision_name = Canada | ||
| seat_type = Capital | | seat_type = Capital | ||
| − | | seat = {{{ | + | | seat = {{{capital|}}} |
| − | | seat1_type = {{#if:{{{ | + | | 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:{{{ | + | | seat1 = {{#if:{{{largestCity|}}} |
| − | |{{{ | + | |{{{largestCity|}}} {{#if:{{{largestMetro|}}}|{{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 = {{{ | + | | data1 = {{{largestMetro|}}} |
}} }} | }} }} | ||
| − | |{{{ | + | |{{{largestMetro|}}} |
}} | }} | ||
| − | | population_demonym = {{{ | + | | population_demonym = {{{demonym|}}} {{#if:{{{officialLang|}}}| |
{{Infobox|child=yes | {{Infobox|child=yes | ||
| rowclass1 = mergedrow | | rowclass1 = mergedrow | ||
| Line 41: | Line 41: | ||
}}}} | }}}} | ||
| government_footnotes = {{{government_footnotes|}}} | | government_footnotes = {{{government_footnotes|}}} | ||
| − | | government_type = {{#ifeq: {{{ | + | | government_type = {{#ifeq: {{{entityAdjective|}}} | Provincial | [[Constitutional monarchy]] | }} |
| − | | leader_title = [[{{{ | + | | leader_title = [[{{{viceroyType}}} of {{#if:{{{name|}}}|{{{name|}}}|{{PAGENAMEBASE}}}}|{{nowrap|{{{viceroyType}}}}}]] |
| − | | leader_name = {{{ | + | | leader_name = {{{viceroy|}}} |
| − | | leader_title1 = [[Premier of {{#if:{{{ | + | | leader_title1 = [[Premier of {{#if:{{{name|}}}|{{{name|}}}|{{PAGENAMEBASE}}}}|Premier]] |
| − | | leader_name1 = {{#if:{{{ | + | | leader_name1 = {{#if:{{{premier|}}}|{{{premier}}} ({{{premierParty}}})}} {{#if:{{{legislature|}}}{{{houseSeats|}}}{{{senateSeats|}}} |
|{{infobox|child=yes | |{{infobox|child=yes | ||
| label1 = Legislature | | label1 = Legislature | ||
| − | | data1 = {{#if:{{{ | + | | data1 = {{#if:{{{legislature|}}}|[[{{{legislature}}}]]}} |
| rowclass1 = | | rowclass1 = | ||
| label2 = Federal representation | | label2 = Federal representation | ||
| − | | data2 = {{#if:{{{ | + | | data2 = {{#if:{{{houseSeats|}}}{{{senateSeats|}}}|{{nowrap|[[Parliament of Canada]]}}}} |
| rowclass2 = mergedtoprow | | rowclass2 = mergedtoprow | ||
| label3 = [[House of Commons of Canada|House seats]] | | label3 = [[House of Commons of Canada|House seats]] | ||
| − | | data3 = {{#if:{{{ | + | | data3 = {{#if:{{{houseSeats|}}}|{{{houseSeats}}} of 338 ({{#expr:{{{houseSeats}}}*100/338 round 1}}%)}} |
| rowclass3 = mergedrow | | rowclass3 = mergedrow | ||
| label4 = [[Senate of Canada|Senate seats]] | | label4 = [[Senate of Canada|Senate seats]] | ||
| − | | data4 = {{#if:{{{ | + | | data4 = {{#if:{{{senateSeats|}}}|[[List of {{#if:{{{Name|}}}|{{{Name|}}}|{{PAGENAMEBASE}}}} 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:{{{ | + | | established_date = {{#if:{{{admittanceDate|}}}|{{{admittanceDate}}} ({{{admittanceOrder}}})}} |
| area_footnotes = {{{area_footnotes|}}} | | area_footnotes = {{{area_footnotes|}}} | ||
| − | | area_rank = {{#if:{{{ | + | | area_rank = {{#if:{{{areaRank|}}}|[[List of Canadian provinces and territories by area|Ranked {{{areaRank}}}]]}} |
| − | | area_total_km2 = {{{ | + | | area_total_km2 = {{{totalArea_km2|}}} |
| − | | area_land_km2 = {{{ | + | | area_land_km2 = {{{landArea_km2|}}} |
| − | | area_water_km2 = {{{ | + | | area_water_km2 = {{{waterArea_km2|}}} |
| − | | area_water_percent = {{#if:{{both|{{{ | + | | area_water_percent = {{#if:{{both|{{{waterArea_km2|}}}|{{{totalArea_km2|}}}}}|{{#expr:{{{waterArea_km2}}}*100/{{{totalArea_km2}}} round 1}} }} |
| − | | area_note = {{#if:{{{ | + | | area_note = {{#if:{{{totalArea_km2|}}}|{{#expr:{{{totalArea_km2}}}*100/9984670 round 1}}% of Canada}} |
| population_footnotes = {{{population_footnotes|}}} | | population_footnotes = {{{population_footnotes|}}} | ||
| − | | population_rank = {{#if:{{{ | + | | population_rank = {{#if:{{{populationRank|}}}|[[Population of Canada by province and territory|Ranked {{{populationRank}}}]]}} |
| − | | population_as_of = {{{ | + | | population_as_of = {{{populationYear|}}} |
| − | | population_total = {{#if:{{{ | + | | 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_est = {{#if:{{{ | + | | population_est = {{#if:{{{population_est|}}}|{{{population_est}}} {{{pop_est_ref|}}}}} |
| − | | pop_est_as_of = {{{ | + | | pop_est_as_of = {{{pop_est_as_of|}}} |
| − | | population_density_km2 = {{#if:{{both|{{{ | + | | 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}} }} |
| 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|}}} | ||
| Line 88: | Line 88: | ||
| 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 = {{{ | + | | postal_code = {{{postalAbbreviation|}}} |
| iso_code = {{#if:{{{ISOCode|}}}|[[ISO 3166-2:CA|{{{ISOCode}}}]]}} | | iso_code = {{#if:{{{ISOCode|}}}|[[ISO 3166-2:CA|{{{ISOCode}}}]]}} | ||
| timezone_link = Time in Canada | | timezone_link = Time in Canada | ||
| timezone = {{{TimeZone|}}} | | timezone = {{{TimeZone|}}} | ||
| area_code_type = [[Canadian postal code|Postal code prefix]] | | area_code_type = [[Canadian postal code|Postal code prefix]] | ||
| − | | area_code = {{{ | + | | area_code = {{{postalCodePrefix|}}} |
| blank_name_sec1 = Flower | | blank_name_sec1 = Flower | ||
| − | | blank_info_sec1 = {{{ | + | | blank_info_sec1 = {{{flower|}}} |
| blank1_name_sec1 = Tree | | blank1_name_sec1 = Tree | ||
| − | | blank1_info_sec1 = {{{ | + | | blank1_info_sec1 = {{{tree|}}} |
| blank2_name_sec1 = Bird | | blank2_name_sec1 = Bird | ||
| − | | blank2_info_sec1 = {{{ | + | | blank2_info_sec1 = {{{bird|}}} |
| − | | website = {{#if:{{{ | + | | website = {{#if:{{{website|}}}|{{URL|1={{{website}}}}}}} |
| footnotes = Rankings include all [[Provinces and territories of Canada|provinces and territories]] | | footnotes = Rankings include all [[Provinces and territories of Canada|provinces and territories]] | ||
}}<noinclude> | }}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 19:19, 12 September 2020
[[Category:Template:Pagetype with short description]]
Script error: No such module "If empty". | |
|---|---|
| Country | Canada |
| Population | |
| • Total | Script error: No such module "Wikidata". |
| Script error: No such module "If empty". | |
| Postal code prefix | Script error: No such module "If empty". |
| Rankings include all provinces and territories | |
[[Category:Infobox templates|Template:Remove first word]]
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
| The above documentation is transcluded from Template:Infobox province or territory of Canada/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |