Difference between revisions of "Template:Infobox census/sandbox"
imported>Frietjes m |
imported>ItsPugle (Syncing with main template page, as seemingly not in use) |
||
| Line 1: | Line 1: | ||
{{Infobox | {{Infobox | ||
| − | | | + | | autoheaders = yes |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| above = {{{name|}}} | | above = {{{name|}}} | ||
| Line 18: | Line 9: | ||
| caption2 = {{{image_caption|}}} | | caption2 = {{{image_caption|}}} | ||
| − | | | + | | subheaderstyle = line-height:130%; |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| subheader = {{#if:{{{previous_census|}}}{{{previous_year|}}}{{{next_census|}}}{{{next_year|}}}| | | subheader = {{#if:{{{previous_census|}}}{{{previous_year|}}}{{{next_census|}}}{{{next_year|}}}| | ||
| − | + | <hr /> | |
| − | + | {{succession links | |
| − | + | | left = {{#if:{{{previous_year|}}}|{{#ifexist:{{{previous_census|}}}|[[{{{previous_census}}}|{{{previous_year}}}]]|{{{previous_year}}}}}|{{{previous_census|}}}}} | |
| − | + | | center = {{#if:{{{date|}}}|'''{{{date}}}'''}} | |
| + | | right = {{#if:{{{next_year|}}}|{{#ifexist:{{{next_census|}}}|[[{{{next_census}}}|{{{next_year}}}]]|{{{next_year}}}}}|{{{next_census|}}}}} | ||
| + | }} | ||
| + | <hr /> | ||
}} | }} | ||
| − | | | + | | headerstyle = text-align: center; background-color: #efefef; margin: 0.1em; padding: 0.05em 0; |
| − | | | + | | header1 = General information |
| − | |||
| − | |||
| − | | | + | | label2 = {{#if:{{{region|}}} | Region | {{#if:{{{country|}}} | Country |}}}} |
| − | | | + | | data2 = {{#if:{{{region|}}} | {{{region|}}} | {{#if:{{{country|}}} | {{{country|}}} |}}}} |
| − | | | + | | label3 = Topics |
| − | | | + | | data3 = {{#if:{{{topic1|}}} | {{Collapsible list |
| + | | title = {{{name|}}} topics | ||
| + | | bullets = yes | ||
| + | | {{{topic1|}}} | ||
| + | |{{#if:{{{topic2|}}} | {{{topic2|}}} |}} | ||
| + | |{{#if:{{{topic3|}}} | {{{topic3|}}} |}} | ||
| + | |{{#if:{{{topic4|}}} | {{{topic4|}}} |}} | ||
| + | |{{#if:{{{topic5|}}} | {{{topic5|}}} |}} | ||
| + | |{{#if:{{{topic6|}}} | {{{topic6|}}} |}} | ||
| + | |{{#if:{{{topic7|}}} | {{{topic7|}}} |}} | ||
| + | |{{#if:{{{topic8|}}} | {{{topic8|}}} |}} | ||
| + | |{{#if:{{{topic9|}}} | {{{topic9|}}} |}} | ||
| + | |{{#if:{{{topic10|}}} | {{{topic10|}}} |}} | ||
| + | }} |}} | ||
| − | | | + | | label4 = Trial census |
| − | | | + | | data4 = {{{trial_census|}}} |
| − | | | + | | label5 = Authority |
| − | | | + | | data5 = {{{authority|}}} |
| − | | | + | | label6 = Website |
| + | | data6 = {{{website|}}} | ||
| + | |||
| + | | header7 = Results | ||
| + | |||
| + | | label8 = Participation | ||
| + | | data8 = {{{participation|}}} | ||
| + | |||
| + | | label9 = Total population | ||
| + | | data9 = {{{population|}}} {{#if: {{{percent_change|}}} | ({{{percent_change|}}}) | {{#if: {{{annual_percent_change|}}} | ({{{annual_percent_change|}}}) |}}}} | ||
| + | |||
| + | | label10 = Most{{Nbsp}}populous{{Nbsp}}{{Wbr}}{{#switch:{{{country|}}} | ||
| Bolivia = department | | Bolivia = department | ||
| Mexico = state | | Mexico = state | ||
| Peru = region | | Peru = region | ||
| Soviet Union = republic | | Soviet Union = republic | ||
| − | |||
| #default = {{if empty|{{{region_type|}}}|region}} | | #default = {{if empty|{{{region_type|}}}|region}} | ||
}} | }} | ||
| − | | | + | | data10 = {{{most_populous|}}} |
| − | | | + | | label11 = Least{{Nbsp}}populous{{Nbsp}}{{Wbr}}{{#switch:{{{country|}}} |
| Bolivia = department | | Bolivia = department | ||
| Mexico = state | | Mexico = state | ||
| Peru = region | | Peru = region | ||
| Soviet Union = republic | | Soviet Union = republic | ||
| − | |||
| #default = {{if empty|{{{region_type|}}}|region}} | | #default = {{if empty|{{{region_type|}}}|region}} | ||
}} | }} | ||
| − | | | + | | data11 = {{{least_populous|}}} |
| − | + | }} | |
| − | }}<noinclude>{{Documentation}}</noinclude> | + | <noinclude>{{Documentation}}</noinclude> |
Latest revision as of 09:22, 7 November 2020
| This is the template sandbox page for Template:Infobox census (diff). See also the companion subpage for test cases. |
This infobox is for use on any census pages. You can list up to ten different census topics, specific the type of subdivision (state/territory etc) that the results are given in, link to the previous and next census, and change the scope of the census.
If |region= is not blank, it will use a "Region" label for the scope of the census, otherwise it will default to a "Country" label. By scope, we're referring to the geographical area completing the census.
A |date= is needed for the succession panel to display correctly. The data can be as broad as needed (for example, it could be just a year), but it needs to not be blank.
Usage
Template:Parameter names example
{{Infobox census
| name =
| logo =
| logo_size =
| logo_caption =
| image =
| image_size =
| image_caption =
| previous_year =
| previous_census =
| date =
| next_year =
| next_census =
| region =
| region_type =
| country =
| topic1 =
| topic2 =
| topic3 =
...
| topic10 =
| authority =
| website =
| participation =
| population =
| percent_change =
| most_populous =
| least_populous =
| additional_label1 =
| additional_data1 =
| additional_label2 =
| additional_data2 =
...
| additional_label5
| additional_data5
}}
TemplateData
TemplateData for Infobox census
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name of the census | name | The name of the census, although not necessarily the page name. For example, the 2021 United Kingdom census is called "Census 2021"
| String | required |
| Logo | logo | File | suggested | |
| Logo size | logo_size | String | optional | |
| Logo caption | logo_caption | String | optional | |
| Image | image | File | optional | |
| Image size | image_size | String | optional | |
| Image caption | image_caption | String | optional | |
| Previous census page | previous_census | Page name for the previous census.
| Page | optional |
| Previous census year | previous_year | Year of the previous census.
| Number | optional |
| Next census page | next_census | Page name for the next census.
| Page | optional |
| Next census year | next_year | Year of the next census.
| Number | optional |
| Country | country | Please only use this parameter if the census covers an entire country. If not, use region.
| String | suggested |
| Census date | date | Date | required | |
| Population recorded | population | Population value recorded in the census. | Number | optional |
| Population percentage point change | percent_change | Change in percentage points versus the last census. | String | optional |
| Region type | region_type | This is for setting the type of region that most and least populous data is provided in (could be state etc, could be city etc). Generally, go for the highest-level, such as state, over something like suburb or city.
| String | optional |
| Most populous region | most_populous | Page | optional | |
| Least populous region | least_populous | Page | optional | |
| Census authority | authority | Operating authority for the census.
| String | optional |
| Census website | website | Please use the URL template. | URL | optional |
| Trial census date | trial_census | Data of a trial census, if run. | Date | optional |
| Census participation | participation | String | optional | |
| First topic | topic1 | You can add up to 10 different topics to be investigated in the census, such as "housing", "employment", "education" etc | String | optional |
| Second topic | topic2 | Requires topic1 to not be empty to display. | String | optional |
| Third topic | topic3 | Requires topic1 to not be empty to display. | String | optional |
| Fourth topic | topic4 | Requires topic1 to not be empty to display. | String | optional |
| Fifth topic | topic5 | Requires topic1 to not be empty to display. | String | optional |
| Sixth topic | topic6 | Requires topic1 to not be empty to display. | String | optional |
| Seventh topic | topic7 | Requires topic1 to not be empty to display. | String | optional |
| Eighth topic | topic8 | Requires topic1 to not be empty to display. | String | optional |
| Ninth topic | topic9 | Requires topic1 to not be empty to display. | String | optional |
| Tenth topic | topic10 | Requires topic1 to not be empty to display. | String | optional |
| Region for the census | region | This parameter is used when the census doesn't span an entire country, for example, only a state or territory.
| String | optional |
| Additional data label 1 | additional_label1 | Use this, paired with additional_data1, to add any additional results from the census | String | optional |
| Additional data 1 | additional_data1 | Use this, paired with additional_label1, to add any additional results from the census | String | optional |
| Additional data label 2 | additional_label2 | Use this, paired with additional_data2, to add any additional results from the census | String | optional |
| Additional data 2 | additional_data2 | Use this, paired with additional_label2, to add any additional results from the census | String | optional |
| Additional data label 3 | additional_label3 | Use this, paired with additional_data3, to add any additional results from the census | String | optional |
| Additional data 3 | additional_data3 | Use this, paired with additional_label3, to add any additional results from the census | String | optional |
| Additional data label 4 | additional_label4 | Use this, paired with additional_data4, to add any additional results from the census | String | optional |
| Additional data 4 | additional_data4 | Use this, paired with additional_label4, to add any additional results from the census | String | optional |
| Additional data label 5 | additional_label5 | Use this, paired with additional_data5, to add any additional results from the census | String | optional |
| Additional data 5 | additional_data5 | Use this, paired with additional_label5, to add any additional results from the census | String | optional |
| annual_percent_change | annual_percent_change | Unknown | deprecated Please use percent_change |
|
Format: block
Infobox to be used for pages for censuses.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name of the census | name | The name of the census, although not necessarily the page name. For example, the 2021 United Kingdom census is called "Census 2021"
| String | required |
| Previous census year | previous_year | Year of the previous census.
| Number | optional |
| Previous census page | previous_census | Page name for the previous census.
| Page | optional |
| Census date | date | no description | Date | required |
| Next census year | next_year | Year of the next census.
| Number | optional |
| Next census page | next_census | Page name for the next census.
| Page | optional |
| Logo | logo | no description | File | suggested |
| Logo size | logo_size | no description | String | optional |
| Image | image | no description | File | optional |
| Image size | image_size | no description | String | optional |
| Logo caption | logo_caption | no description | String | optional |
| Image caption | image_caption | no description | String | optional |
| Region for the census | region | This parameter is used when the census doesn't span an entire country, for example, only a state or territory.
| String | optional |
| Country | country | Please only use this parameter if the census covers an entire country. If not, use region.
| String | suggested |
| First topic | topic1 | You can add up to 10 different topics to be investigated in the census, such as "housing", "employment", "education" etc | String | optional |
| Second topic | topic2 | Requires topic1 to not be empty to display. | String | optional |
| Third topic | topic3 | Requires topic1 to not be empty to display. | String | optional |
| Fourth topic | topic4 | Requires topic1 to not be empty to display. | String | optional |
| Fifth topic | topic5 | Requires topic1 to not be empty to display. | String | optional |
| Sixth topic | topic6 | Requires topic1 to not be empty to display. | String | optional |
| Seventh topic | topic7 | Requires topic1 to not be empty to display. | String | optional |
| Eighth topic | topic8 | Requires topic1 to not be empty to display. | String | optional |
| Ninth topic | topic9 | Requires topic1 to not be empty to display. | String | optional |
| Tenth topic | topic10 | Requires topic1 to not be empty to display. | String | optional |
| Trial census date | trial_census | Data of a trial census, if run. | Date | optional |
| Census authority | authority | Operating authority for the census.
| String | optional |
| Census website | website | Please use the URL template. | URL | optional |
| Census participation | participation | no description | String | optional |
| Population recorded | population | Population value recorded in the census. | Number | optional |
| Population percentage point change | percent_change | Change in percentage points versus the last census. | String | optional |
| Region type | region_type | This is for setting the type of region that most and least populous data is provided in (could be state etc, could be city etc). Generally, go for the highest-level, such as state, over something like suburb or city.
| String | optional |
| Most populous region | most_populous | no description | Page | optional |
| Least populous region | least_populous | no description | Page | optional |
| Additional data label 1 | additional_label1 | Use this, paired with additional_data1, to add any additional results from the census | String | optional |
| Additional data 1 | additional_data1 | Use this, paired with additional_label1, to add any additional results from the census | String | optional |
| Additional data label 2 | additional_label2 | Use this, paired with additional_data2, to add any additional results from the census | String | optional |
| Additional data 2 | additional_data2 | Use this, paired with additional_label2, to add any additional results from the census | String | optional |
| Additional data label 3 | additional_label3 | Use this, paired with additional_data3, to add any additional results from the census | String | optional |
| Additional data 3 | additional_data3 | Use this, paired with additional_label3, to add any additional results from the census | String | optional |
| Additional data label 4 | additional_label4 | Use this, paired with additional_data4, to add any additional results from the census | String | optional |
| Additional data 4 | additional_data4 | Use this, paired with additional_label4, to add any additional results from the census | String | optional |
| Additional data label 5 | additional_label5 | Use this, paired with additional_data5, to add any additional results from the census | String | optional |
| Additional data 5 | additional_data5 | Use this, paired with additional_label5, to add any additional results from the census | String | optional |
| Annual_percent_change | annual_percent_change | no description | Unknown | deprecated |
| The above documentation is transcluded from Template:Infobox census/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. |