Difference between revisions of "Template:Infobox constituency/doc"
imported>AquaDTRS (added basic blank version, update some param descriptions) |
imported>Brojam (added missing parameter) |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- Categories and interwikis go at the bottom of this page. --> | <!-- Categories and interwikis go at the bottom of this page. --> | ||
| − | |||
| − | This template is used to provide an infobox for electoral | + | This template is used to provide an infobox for [[electoral district]]s. |
== Usage == | == Usage == | ||
| Line 16: | Line 15: | ||
|map_size | |map_size | ||
|image | |image | ||
| + | |image_size | ||
|map_entity | |map_entity | ||
|map_year | |map_year | ||
| Line 45: | Line 45: | ||
|map_size = | |map_size = | ||
|image = | |image = | ||
| + | |image_size = | ||
|map_entity = | |map_entity = | ||
|map_year = | |map_year = | ||
| Line 71: | Line 72: | ||
|name | |name | ||
|type | |type | ||
| − | | | + | |constituency_type |
|constituency_link | |constituency_link | ||
|parl_name | |parl_name | ||
| Line 77: | Line 78: | ||
|map_size | |map_size | ||
|image | |image | ||
| + | |image_size | ||
|map_entity | |map_entity | ||
|map_year | |map_year | ||
| Line 124: | Line 126: | ||
|name = | |name = | ||
|type = | |type = | ||
| + | |constituency_type = | ||
|constituency_link = | |constituency_link = | ||
|parl_name = <!-- name of the law making body --> | |parl_name = <!-- name of the law making body --> | ||
| Line 129: | Line 132: | ||
|map_size = | |map_size = | ||
|image = | |image = | ||
| + | |image_size = | ||
|map_entity = | |map_entity = | ||
|map_year = | |map_year = | ||
| Line 173: | Line 177: | ||
</pre> | </pre> | ||
| − | == | + | == TemplateData == |
| − | + | {{TemplateData header}} | |
| − | { | + | <templatedata> |
| − | + | { | |
| − | + | "params": { | |
| − | + | "name": { | |
| − | + | "description": "The name of the electoral district", | |
| − | + | "type": "string", | |
| − | + | "required": true | |
| − | + | }, | |
| − | + | "abolished": { | |
| − | + | "description": "The year the constituency was abolished. If the parameter is used, the infobox header will include the word 'Former'. ", | |
| − | + | "type": "number" | |
| − | + | }, | |
| − | + | "type": { | |
| − | + | "description": "The type of electoral district", | |
| − | + | "suggested": true | |
| − | + | }, | |
| − | + | "parl_name": { | |
| − | + | "description": "The wikilink of the parliament name", | |
| − | + | "suggested": true, | |
| − | + | "label": "Parliament name", | |
| − | + | "example": "Parliament of Singapore, Legisltive Council of Hong Kong" | |
| − | + | }, | |
| − | + | "map1": { | |
| − | + | "description": "Filename of map ending with Constituency.svg", | |
| − | + | "type": "string", | |
| − | + | "suggested": true, | |
| − | + | "label": "Map name 1", | |
| − | + | "example": "typing 'XXX' generates [[File:XXX Constituency.svg]]" | |
| − | + | }, | |
| − | + | "map_size": { | |
| − | + | "description": "The map size in pixels", | |
| − | + | "label": "Map size", | |
| − | + | "example": "240, 240px" | |
| − | + | }, | |
| − | + | "image": { | |
| − | + | "description": "Full filename of a map image", | |
| − | + | "type": "wiki-file-name", | |
| − | + | "label": "Image 1", | |
| − | + | "example": "Image:XXX-constituency.png" | |
| − | + | }, | |
| − | + | "image_size": { | |
| − | + | "description": "The map image size in pixels", | |
| − | + | "label": "Image size", | |
| − | + | "example": "240, 240px" | |
| − | + | }, | |
| − | + | "map_entity": { | |
| − | + | "description": "The location of a specified entity on a map", | |
| − | + | "type": "string", | |
| − | + | "label": "Map entity" | |
| − | + | }, | |
| − | + | "map_year": { | |
| − | + | "description": "The year of the general election in which the map boundaries were drawn", | |
| − | + | "type": "number", | |
| − | + | "label": "Map year" | |
| − | + | }, | |
| − | + | "caption": { | |
| − | + | "description": "Caption for map/image 1", | |
| − | + | "label": "Caption 1" | |
| − | + | }, | |
| − | + | "map2": { | |
| − | + | "label": "Map name 2", | |
| − | + | "description": "Filename of map ending with .svg", | |
| − | + | "type": "string", | |
| − | + | "example": "typing 'XXX' generates [[File:XXX.svg]]" | |
| − | + | }, | |
| − | + | "image2": { | |
| − | + | "label": "Image 2", | |
| − | + | "description": "Full filename of a map image", | |
| − | + | "type": "wiki-file-name", | |
| − | + | "example": "Image:XXX-constituency.png" | |
| − | + | }, | |
| − | + | "region": { | |
| − | + | "description": "The region, state or province in which the constituency is located at. " | |
| − | + | }, | |
| − | + | "caption2": { | |
| − | + | "label": "Caption 2", | |
| − | + | "description": "Caption for map/image 2" | |
| − | + | }, | |
| − | + | "map3": { | |
| − | + | "label": "Map name 3", | |
| − | + | "description": "Filename of map ending with .svg", | |
| − | + | "type": "string", | |
| − | + | "example": "typing 'XXX' generates [[File:XXX.svg]]" | |
| − | + | }, | |
| − | + | "image3": { | |
| − | + | "label": "Image 3", | |
| − | + | "description": "Full filename of a map image", | |
| + | "type": "wiki-file-name", | ||
| + | "example": "Image:XXX-constituency.png" | ||
| + | }, | ||
| + | "caption3": { | ||
| + | "label": "Caption 3", | ||
| + | "description": "Caption for map/image 3" | ||
| + | }, | ||
| + | "map4": { | ||
| + | "label": "Map name 4", | ||
| + | "description": "Filename of map", | ||
| + | "type": "string", | ||
| + | "example": "typing 'XXX' generates [[File:XXX]]" | ||
| + | }, | ||
| + | "image4": { | ||
| + | "label": "Image 4", | ||
| + | "description": "Full filename of a map image", | ||
| + | "type": "wiki-file-name", | ||
| + | "example": "Image:XXX-constituency.png" | ||
| + | }, | ||
| + | "caption4": { | ||
| + | "label": "Caption 4", | ||
| + | "description": "Caption for map/image 4" | ||
| + | }, | ||
| + | "district_label": { | ||
| + | "label": "District label", | ||
| + | "description": "Label for the district parameter, otherwise shows as 'District'. " | ||
| + | }, | ||
| + | "district": { | ||
| + | "description": "The district(s) in which the constituency is located at. " | ||
| + | }, | ||
| + | "region_label": { | ||
| + | "description": "Label for the region parameter, otherwise shows as 'Region'. ", | ||
| + | "label": "Region label" | ||
| + | }, | ||
| + | "polling_divisions": { | ||
| + | "label": "Polling divisions", | ||
| + | "description": "Name of the polling divisions" | ||
| + | }, | ||
| + | "population": { | ||
| + | "description": "The total population within the constituency. ", | ||
| + | "type": "number" | ||
| + | }, | ||
| + | "electorate": { | ||
| + | "description": "The number of eligible voters within the constituency. ", | ||
| + | "suggested": true, | ||
| + | "type": "number" | ||
| + | }, | ||
| + | "towns": { | ||
| + | "description": "Major settlements near the constituency", | ||
| + | "label": "Major settlements" | ||
| + | }, | ||
| + | "future": { | ||
| + | "description": "If set to any value, the sub-header will display as 'Future constituency'. ", | ||
| + | "label": "Future?" | ||
| + | }, | ||
| + | "year": { | ||
| + | "description": "The year the constituency was first established.", | ||
| + | "type": "number" | ||
| + | }, | ||
| + | "abolished_label": { | ||
| + | "description": "Label for the abolished parameter, otherwise shows as 'Abolished'. ", | ||
| + | "label": "Abolished label" | ||
| + | }, | ||
| + | "seats": { | ||
| + | "description": "(replaces Number of members) The number of seats in Parliament represented by the constituency. ", | ||
| + | "suggested": true, | ||
| + | "label": "Seats", | ||
| + | "type": "number" | ||
| + | }, | ||
| + | "party_label": { | ||
| + | "description": "Label for the party parameter, otherwise shows as 'Party'. ", | ||
| + | "label": "Party label" | ||
| + | }, | ||
| + | "party": { | ||
| + | "description": "The governing party of the electoral district.", | ||
| + | "suggested": true, | ||
| + | "label": "Party" | ||
| + | }, | ||
| + | "member_label": { | ||
| + | "aliases": [ | ||
| + | "members_label" | ||
| + | ], | ||
| + | "description": "Label for the members parameter, otherwise shows as 'Member(s)'.", | ||
| + | "label": "Member(s) label" | ||
| + | }, | ||
| + | "member": { | ||
| + | "aliases": [ | ||
| + | "members" | ||
| + | ], | ||
| + | "description": "The number of people governing the constituency.", | ||
| + | "label": "Member(s)" | ||
| + | }, | ||
| + | "local_council_label": { | ||
| + | "description": "Label for the local_council parameter, otherwise shows as 'Local council'. ", | ||
| + | "label": "Local council label" | ||
| + | }, | ||
| + | "local_council": { | ||
| + | "description": "The name of the local council or office in charge of the constituency. ", | ||
| + | "label": "Local council" | ||
| + | }, | ||
| + | "parts_label": { | ||
| + | "label": "Subdivisions label", | ||
| + | "description": "Label for the parts parameter, otherwise shows as 'Subdivisions'. " | ||
| + | }, | ||
| + | "parts": { | ||
| + | "label": "Subdivisions", | ||
| + | "description": "Name of subdivisions" | ||
| + | }, | ||
| + | "previous": { | ||
| + | "description": "The name of the previous electoral district in which the current electoral district was carved out or merged from. ", | ||
| + | "label": "Created from" | ||
| + | }, | ||
| + | "next": { | ||
| + | "description": "The name of the new electoral district carved out or merged from the current electoral district.", | ||
| + | "label": "Replaced by" | ||
| + | }, | ||
| + | "blank1_name": { | ||
| + | "description": "Label for extra parameter 1", | ||
| + | "label": "Extra parameter 1 label" | ||
| + | }, | ||
| + | "blank1_info": { | ||
| + | "description": "Extra parameter 1", | ||
| + | "label": "Extra parameter 1" | ||
| + | }, | ||
| + | "blank2_name": { | ||
| + | "description": "Label for extra parameter 2", | ||
| + | "label": "Extra parameter 2 label" | ||
| + | }, | ||
| + | "blank2_info": { | ||
| + | "description": "Extra parameter 2", | ||
| + | "label": "Extra parameter 2" | ||
| + | }, | ||
| + | "blank3_name": { | ||
| + | "description": "Label for extra parameter 3", | ||
| + | "label": "Extra parameter 3 label" | ||
| + | }, | ||
| + | "blank3_info": { | ||
| + | "description": "Extra parameter 3", | ||
| + | "label": "Extra parameter 4" | ||
| + | }, | ||
| + | "blank4_name": { | ||
| + | "description": "Label for extra parameter 4", | ||
| + | "label": "Extra parameter 4 label" | ||
| + | }, | ||
| + | "blank4_info": { | ||
| + | "description": "Extra parameter 4", | ||
| + | "label": "Extra parameter 4" | ||
| + | }, | ||
| + | "blank5_name": { | ||
| + | "description": "Label for extra parameter 5", | ||
| + | "label": "Extra parameter 5 label" | ||
| + | }, | ||
| + | "blank5_info": { | ||
| + | "label": "Extra parameter 5", | ||
| + | "description": "Extra parameter 5" | ||
| + | }, | ||
| + | "constituency_type": { | ||
| + | "description": "Label/type for the constituency parameter, otherwise shows as 'constituency'. ", | ||
| + | "label": "Constituency type" | ||
| + | }, | ||
| + | "constituency_link": { | ||
| + | "description": "The wikilink of the constituency", | ||
| + | "label": "Constitutency wikilink" | ||
| + | }, | ||
| + | "elects_howmany": { | ||
| + | "label": "Number of members", | ||
| + | "description": "The number of people elected to Parliament by the constitutency.", | ||
| + | "type": "number" | ||
| + | }, | ||
| + | "area": { | ||
| + | "description": "The area of the constituency", | ||
| + | "example": "100 square kilometres" | ||
| + | }, | ||
| + | "nativename": { | ||
| + | "label": "Native name", | ||
| + | "description": "The native name of the constitutency" | ||
| + | } | ||
| + | }, | ||
| + | "paramOrder": [ | ||
| + | "name", | ||
| + | "nativename", | ||
| + | "type", | ||
| + | "constituency_type", | ||
| + | "constituency_link", | ||
| + | "parl_name", | ||
| + | "map1", | ||
| + | "map2", | ||
| + | "map3", | ||
| + | "map4", | ||
| + | "map_size", | ||
| + | "map_entity", | ||
| + | "map_year", | ||
| + | "image", | ||
| + | "image2", | ||
| + | "image3", | ||
| + | "image4", | ||
| + | "image_size", | ||
| + | "caption", | ||
| + | "caption2", | ||
| + | "caption3", | ||
| + | "caption4", | ||
| + | "district_label", | ||
| + | "district", | ||
| + | "region_label", | ||
| + | "region", | ||
| + | "polling_divisions", | ||
| + | "population", | ||
| + | "electorate", | ||
| + | "towns", | ||
| + | "area", | ||
| + | "future", | ||
| + | "year", | ||
| + | "abolished_label", | ||
| + | "abolished", | ||
| + | "elects_howmany", | ||
| + | "seats", | ||
| + | "party_label", | ||
| + | "party", | ||
| + | "member_label", | ||
| + | "member", | ||
| + | "local_council_label", | ||
| + | "local_council", | ||
| + | "parts_label", | ||
| + | "parts", | ||
| + | "previous", | ||
| + | "next", | ||
| + | "blank1_name", | ||
| + | "blank1_info", | ||
| + | "blank2_name", | ||
| + | "blank2_info", | ||
| + | "blank3_name", | ||
| + | "blank3_info", | ||
| + | "blank4_name", | ||
| + | "blank4_info", | ||
| + | "blank5_name", | ||
| + | "blank5_info" | ||
| + | ] | ||
| + | } | ||
| + | </templatedata> | ||
| + | |||
| + | == Example == | ||
<includeonly>{{Sandbox other|| | <includeonly>{{Sandbox other|| | ||
<!-- Categories go here: --> | <!-- Categories go here: --> | ||
| − | [[Category:Constituency templates]] | + | [[Category:Constituency infobox templates| ]] |
[[Category:Infobox templates with module parameter|Constituency]] | [[Category:Infobox templates with module parameter|Constituency]] | ||
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 01:58, 15 September 2020
| 40px | This is a documentation subpage for Template:Infobox constituency. It contains usage information, categories and other content that is not part of the original template page. |
This template is used to provide an infobox for electoral districts.
Usage
Basic Version
This is a basic version of the template that is suitable for general use; most optional parameters have been removed. Template:Parameter names example
{{Infobox constituency
|name =
|type =
|constituency_link =
|parl_name = <!-- name of the law making body -->
|map1 =
|map_size =
|image =
|image_size =
|map_entity =
|map_year =
|caption =
|district =
|region =
|population =
|electorate =
|towns =
|future =
|year = <!-- year of establishment -->
|abolished =
|members =
|seats =
|elects_howmany =
|party =
|local_council =
|next =
|previous =
}}
Full Blank Template
This is the full version of the template with all its optional parameters displayed. Template:Parameter names example
{{Infobox constituency
|name =
|type =
|constituency_type =
|constituency_link =
|parl_name = <!-- name of the law making body -->
|map1 =
|map_size =
|image =
|image_size =
|map_entity =
|map_year =
|caption =
|map2 =
|image2 =
|caption2 =
|map3 =
|image3 =
|caption3 =
|map4 =
|image4 =
|caption4 =
|district_label = <!-- can be State/Province, region, county -->
|district =
|region_label = <!-- can be State/Province, region, county -->
|region =
|population =
|electorate =
|towns =
|future =
|year = <!-- year of establishment -->
|abolished_label =
|abolished =
|members_label =
|members =
|seats =
|elects_howmany =
|party_label = <!-- defaults to "Party" -->
|party =
|local_council_label =
|local_council =
|next =
|previous =
|blank1_name =
|blank1_info =
|blank2_name =
|blank2_info =
|blank3_name =
|blank3_info =
|blank4_name =
|blank4_info =
}}
TemplateData
TemplateData for Infobox constituency
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name | name | The name of the electoral district | String | required |
| Native name | nativename | The native name of the constitutency | Unknown | optional |
| Type | type | The type of electoral district | Unknown | suggested |
| Constituency type | constituency_type | Label/type for the constituency parameter, otherwise shows as 'constituency'. | Unknown | optional |
| Constitutency wikilink | constituency_link | The wikilink of the constituency | Unknown | optional |
| Parliament name | parl_name | The wikilink of the parliament name
| Unknown | suggested |
| Map name 1 | map1 | Filename of map ending with Constituency.svg
| String | suggested |
| Map name 2 | map2 | Filename of map ending with .svg
| String | optional |
| Map name 3 | map3 | Filename of map ending with .svg
| String | optional |
| Map name 4 | map4 | Filename of map
| String | optional |
| Map size | map_size | The map size in pixels
| Unknown | optional |
| Map entity | map_entity | The location of a specified entity on a map | String | optional |
| Map year | map_year | The year of the general election in which the map boundaries were drawn | Number | optional |
| Image 1 | image | Full filename of a map image
| File | optional |
| Image 2 | image2 | Full filename of a map image
| File | optional |
| Image 3 | image3 | Full filename of a map image
| File | optional |
| Image 4 | image4 | Full filename of a map image
| File | optional |
| Image size | image_size | The map image size in pixels
| Unknown | optional |
| Caption 1 | caption | Caption for map/image 1 | Unknown | optional |
| Caption 2 | caption2 | Caption for map/image 2 | Unknown | optional |
| Caption 3 | caption3 | Caption for map/image 3 | Unknown | optional |
| Caption 4 | caption4 | Caption for map/image 4 | Unknown | optional |
| District label | district_label | Label for the district parameter, otherwise shows as 'District'. | Unknown | optional |
| District | district | The district(s) in which the constituency is located at. | Unknown | optional |
| Region label | region_label | Label for the region parameter, otherwise shows as 'Region'. | Unknown | optional |
| Region | region | The region, state or province in which the constituency is located at. | Unknown | optional |
| Polling divisions | polling_divisions | Name of the polling divisions | Unknown | optional |
| Population | population | The total population within the constituency. | Number | optional |
| Electorate | electorate | The number of eligible voters within the constituency. | Number | suggested |
| Major settlements | towns | Major settlements near the constituency | Unknown | optional |
| Area | area | The area of the constituency
| Unknown | optional |
| Future? | future | If set to any value, the sub-header will display as 'Future constituency'. | Unknown | optional |
| Year | year | The year the constituency was first established. | Number | optional |
| Abolished label | abolished_label | Label for the abolished parameter, otherwise shows as 'Abolished'. | Unknown | optional |
| Abolished | abolished | The year the constituency was abolished. If the parameter is used, the infobox header will include the word 'Former'. | Number | optional |
| Number of members | elects_howmany | The number of people elected to Parliament by the constitutency. | Number | optional |
| Seats | seats | (replaces Number of members) The number of seats in Parliament represented by the constituency. | Number | suggested |
| Party label | party_label | Label for the party parameter, otherwise shows as 'Party'. | Unknown | optional |
| Party | party | The governing party of the electoral district. | Unknown | suggested |
| Member(s) label | member_label members_label | Label for the members parameter, otherwise shows as 'Member(s)'. | Unknown | optional |
| Member(s) | member members | The number of people governing the constituency. | Unknown | optional |
| Local council label | local_council_label | Label for the local_council parameter, otherwise shows as 'Local council'. | Unknown | optional |
| Local council | local_council | The name of the local council or office in charge of the constituency. | Unknown | optional |
| Subdivisions label | parts_label | Label for the parts parameter, otherwise shows as 'Subdivisions'. | Unknown | optional |
| Subdivisions | parts | Name of subdivisions | Unknown | optional |
| Created from | previous | The name of the previous electoral district in which the current electoral district was carved out or merged from. | Unknown | optional |
| Replaced by | next | The name of the new electoral district carved out or merged from the current electoral district. | Unknown | optional |
| Extra parameter 1 label | blank1_name | Label for extra parameter 1 | Unknown | optional |
| Extra parameter 1 | blank1_info | Extra parameter 1 | Unknown | optional |
| Extra parameter 2 label | blank2_name | Label for extra parameter 2 | Unknown | optional |
| Extra parameter 2 | blank2_info | Extra parameter 2 | Unknown | optional |
| Extra parameter 3 label | blank3_name | Label for extra parameter 3 | Unknown | optional |
| Extra parameter 4 | blank3_info | Extra parameter 3 | Unknown | optional |
| Extra parameter 4 label | blank4_name | Label for extra parameter 4 | Unknown | optional |
| Extra parameter 4 | blank4_info | Extra parameter 4 | Unknown | optional |
| Extra parameter 5 label | blank5_name | Label for extra parameter 5 | Unknown | optional |
| Extra parameter 5 | blank5_info | Extra parameter 5 | Unknown | optional |