Template:Infobox ward: Difference between revisions

Template page
(Copied and modified from https://en.wikipedia.org/wiki/Template:Infobox_Australian_Electorate)
 
(Added documentation, based off docs from Template:Infobox Australian Electorate on Wikipedia, with modifications)
 
(4 intermediate revisions by the same user not shown)
Line 12: Line 12:
| datastyle    =  
| datastyle    =  
| label1      = Council
| label1      = Council
| data1        = {{#ifeq: {{{federal}}} | yes | | {{ #switch: {{lc:{{{state|}}} }}
| data1        = {{#ifeq: {{{council}}} | yes | | {{ #switch: {{lc:{{{council|}}} }}
   |bor      = [[City of Boroondara]]
   |bor      = [[City of Boroondara|Boroondara]]
   |cam      = [[City of Camberwell|Camberwell]]
   |cam      = [[City of Camberwell|Camberwell]]
   |haw      = [[City of Hawthorn|Hawthorn]]
   |haw      = [[City of Hawthorn|Hawthorn]]
   |kew      = [[City of Kew|Kew]]
   |kew      = [[City of Kew|Kew]]
   |<span class="council">{{auto link|{{{state|}}}}}</span>
   |<span class="council">{{auto link|{{{council|}}}}}</span>
   }} }}
   }} }}
| label2      = Created
| label2      = Created
Line 34: Line 34:
| data8        = {{#if:{{{electors|}}}|{{#iferror:{{#expr:{{{electors}}}}}|{{{electors}}}|{{formatnum:{{{electors}}}}}}}{{#if:{{{electors_year|}}}|&nbsp;({{{electors_year}}}){{{electors_footnotes|}}}}}}}
| data8        = {{#if:{{{electors|}}}|{{#iferror:{{#expr:{{{electors}}}}}|{{{electors}}}|{{formatnum:{{{electors}}}}}}}{{#if:{{{electors_year|}}}|&nbsp;({{{electors_year}}}){{{electors_footnotes|}}}}}}}
| label9      = Area
| label9      = Area
| data9        = {{#if:{{{area|}}}|{{formatnum:{{{area}}}}}&nbsp;km<sup>2</sup> ({{rnd|{{{area}}}/2.589988110336|1}}&nbsp;sq&nbsp;mi){{{area_footnotes|}}} }}
| data9        = {{#if:{{{area|}}}|{{formatnum:{{{area}}}}}&nbsp;km<sup>2</sup> {{{area_footnotes|}}} }}
| label10      = Demographic
| label10      = Demographic
| data10      = {{{class|}}}
| data10      = {{{class|}}}
Line 43: Line 43:
[[Category:Wards]]
[[Category:Wards]]
</includeonly>
</includeonly>
<noinclude>
<noinclude>
==Usage==
Copy and paste the following for use in articles. If not sure what to put in them, look at the Fields section below.
<pre>{{Infobox ward
| name              =
| image              =
| image_upright      =
| image_alt          =
| caption            =
| council            =
| created            =
| cr                =
| cr-party          =
| namesake          =
| electors          =
| electors_year      =
| electors_footnotes =
| area              =
| class              =
| footnotes          =
}}</pre>
==Fields==
All fields used by this template are optional. The following fields are available:
{| class="wikitable plainrowheaders" style="background-color: white;"
! scope="col" style="background-color: whitesmoke;" | Field name
! scope="col" style="background-color: whitesmoke;" | Description
! scope="col" style="background-color: whitesmoke;" | Valid for<br /><small>blank = all</small>
! scope="col" style="background-color: whitesmoke;" | Source/notes
! scope="col" style="background-color: whitesmoke;" | Values
|-
| scope="row" | name
| name of ward
|
|
|  plain text (e.g. North)
|-
| scope="row" | council
| council abbreviation
|
|
| 'bor', 'cam', 'haw', 'kew'
|-
| scope="row" | image
| image or map relevant to electorate
|
|
| filename
|-
| scope="row" | image_upright
| width of generic image of the locality
|
| This is an optional field. If not specified, the image width will default to {{para|upright|1.23}}, which is approximately 270px if the default thumbnail size has not been changed at [[Special:Preferences]]) The size should not be set to a value that would result in an image width greater than 300px. See [[Wikipedia:Template:Infobox Australian Electorate#Calculating "image_upright"|help below]] for guidance on determining the value to be used.
| number
|-
| scope="row" | image_alt
| Alt text for the image
|
|
| wikitext (can contain links)
|-
| scope="row" | caption
| caption for the locality image
|
|
| wikitext (can contain links)
|-
| scope="row" | created
| date or year electorate was created
|
|
| year or wiki date
|-
| scope="row" | abolished
| date or year electorate was abolished
|
|
| year or wiki date
|-
| scope="row" | lifespan
| lifespan of electorate for cases where the seat has been recreated
|
|
| year or wiki date (e.g. 1890–1950, 1962–present)
|-
| scope="row" | cr
| current councillor in office (for proportional, list of all councillors)
|
|
| plain text or wikilink
|-
| scope="row" | cr-party
| current party in office
|
|
| plain text or wikilink
|-
| scope="row" | namesake
| who or what electorate is named after
|
|
| plain text or wikilink
|-
| scope="row" | electors
| how many people are enrolled to vote in the area
|
|
| number, unformatted
|-
| scope="row" | electors_year
| year to which the figure in <code>electors</code> applies
|
|
| raw year
|-
| scope="row" | electors_footnotes
| footnote for <code>electors</code> figure
|
|
| wikitext (can contain links)<br />Best when used with <nowiki><ref> </ref></nowiki> tags
|-
| scope="row" | area
| area in square kilometres (do ''not'' use commas or punctuation)
|
|
| number
|-
| scope="row" | class
| VEC class of the ward if applicable (e.g. Rural)
|
|
| plain text
|-
| scope="row" | footnotes
| footnotes
|
|
| wikitext (can contain links)<br />Best when used with <nowiki><ref> </ref></nowiki> tags and a citation template such as {{tl|cite web}}
|}
[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>

Latest revision as of 22:53, 31 August 2016



Usage

Copy and paste the following for use in articles. If not sure what to put in them, look at the Fields section below.

{{Infobox ward
| name               = 
| image              = 
| image_upright      = 
| image_alt          = 
| caption            = 
| council            =
| created            = 
| cr                 = 
| cr-party           = 
| namesake           = 
| electors           = 
| electors_year      = 
| electors_footnotes = 
| area               = 
| class              = 
| footnotes          = 
}}

Fields

All fields used by this template are optional. The following fields are available:

Field name Description Valid for
blank = all
Source/notes Values
name name of ward plain text (e.g. North)
council council abbreviation 'bor', 'cam', 'haw', 'kew'
image image or map relevant to electorate filename
image_upright width of generic image of the locality This is an optional field. If not specified, the image width will default to |upright=1.23, which is approximately 270px if the default thumbnail size has not been changed at Special:Preferences) The size should not be set to a value that would result in an image width greater than 300px. See help below for guidance on determining the value to be used. number
image_alt Alt text for the image wikitext (can contain links)
caption caption for the locality image wikitext (can contain links)
created date or year electorate was created year or wiki date
abolished date or year electorate was abolished year or wiki date
lifespan lifespan of electorate for cases where the seat has been recreated year or wiki date (e.g. 1890–1950, 1962–present)
cr current councillor in office (for proportional, list of all councillors) plain text or wikilink
cr-party current party in office plain text or wikilink
namesake who or what electorate is named after plain text or wikilink
electors how many people are enrolled to vote in the area number, unformatted
electors_year year to which the figure in electors applies raw year
electors_footnotes footnote for electors figure wikitext (can contain links)
Best when used with <ref> </ref> tags
area area in square kilometres (do not use commas or punctuation) number
class VEC class of the ward if applicable (e.g. Rural) plain text
footnotes footnotes wikitext (can contain links)
Best when used with <ref> </ref> tags and a citation template such as {{cite web}}