Difference between revisions of "Template:Infobox settlement/densdisp/doc"
imported>Plastikspork (→Usage: + spaces) |
imported>Rich Farmbrough |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | ||
| − | This '''subtemplate of {{ | + | This '''subtemplate of {{Tl|Infobox settlement}}''' displays a metric/imperial pair of population density values for a line in the main infobox. |
=== Usage === | === Usage === | ||
| − | <code><nowiki>{{ | + | <code><nowiki>{{Infobox settlement/densdisp|unit_pref|DENSsqmi|DENSkm2|POP|AREAsqmi|AREAkm2|subdivision_name}}</nowiki></code> |
| − | where ''DENSsqmi'' and ''DENSkm2'' are the density values to be displayed (one may be blank for automatic conversion if the other is numeric; or they may be set to '''auto''' for automatic calculation if ''POP'' and the corresponding ''AREA...'' parameter are present). Other parameters are taken from {{ | + | where ''DENSsqmi'' and ''DENSkm2'' are the density values to be displayed (one may be blank for automatic conversion if the other is numeric; or they may be set to '''auto''' for automatic calculation if ''POP'' and the corresponding ''AREA...'' parameter are present). Other parameters are taken from {{Tl|infobox settlement}}. |
Whether the metric or imperial value is displayed first depends on the value of ''subdivision_name'' (usually the country name) and ''unit_pref'' (which can be set to '''Imperial''' to force imperial-first display). The default for non-US non-UK countries is metric first. | Whether the metric or imperial value is displayed first depends on the value of ''subdivision_name'' (usually the country name) and ''unit_pref'' (which can be set to '''Imperial''' to force imperial-first display). The default for non-US non-UK countries is metric first. | ||
| − | Rounding is always to one decimal place; the units are not wikilinked (compare {{ | + | Rounding is always to one decimal place; the units are not wikilinked (compare {{Tl|infobox settlement/areadisp}}). |
{| class="wikitable" border=1 | {| class="wikitable" border=1 | ||
| Line 16: | Line 16: | ||
!Result | !Result | ||
|- | |- | ||
| − | |style="padding: 20px"|<code><nowiki>{{ | + | |style="padding: 20px"|<code><nowiki>{{Infobox settlement/densdisp|Imperial|auto| |8400|42| |Canada}}</nowiki></code> |
| − | |style="padding: 20px"|{{ | + | |style="padding: 20px"|{{Infobox settlement/densdisp|Imperial|auto| |8400|42| |Canada}} |
|- | |- | ||
| − | |style="padding: 20px"|<code><nowiki>{{ | + | |style="padding: 20px"|<code><nowiki>{{Infobox settlement/densdisp|metric|auto| |8400|42| |Canada}}</nowiki></code> |
| − | |style="padding: 20px"|{{ | + | |style="padding: 20px"|{{Infobox settlement/densdisp|metric|auto| |8400|42| |Canada}} |
|- | |- | ||
| − | |style="padding: 20px"|<code><nowiki>{{ | + | |style="padding: 20px"|<code><nowiki>{{Infobox settlement/densdisp|Imperial|auto| |8400| |109|Canada}}</nowiki></code> |
| − | |style="padding: 20px"|{{ | + | |style="padding: 20px"|{{Infobox settlement/densdisp|Imperial| |auto|8400| |109|Canada}} |
|- | |- | ||
| − | |style="padding: 20px"|<code><nowiki>{{ | + | |style="padding: 20px"|<code><nowiki>{{Infobox settlement/densdisp|metric|auto| |8400| |109|Canada}}</nowiki></code> |
| − | |style="padding: 20px"|{{ | + | |style="padding: 20px"|{{Infobox settlement/densdisp|metric| |auto|8400| |109|Canada}} |
|- | |- | ||
| − | |style="padding: 20px"|<code><nowiki>{{ | + | |style="padding: 20px"|<code><nowiki>{{Infobox settlement/densdisp|Imperial|auto|auto|8400|42| |Canada}}</nowiki></code> |
| − | |style="padding: 20px"|{{ | + | |style="padding: 20px"|{{Infobox settlement/densdisp|Imperial|auto|auto|8400|42| |Canada}} |
|- | |- | ||
| − | |style="padding: 20px"|<code><nowiki>{{ | + | |style="padding: 20px"|<code><nowiki>{{Infobox settlement/densdisp|metric|auto|auto|8400|42| |Canada}}</nowiki></code> |
| − | |style="padding: 20px"|{{ | + | |style="padding: 20px"|{{Infobox settlement/densdisp|metric|auto|auto|8400|42| |Canada}} |
|- | |- | ||
| − | |style="padding: 20px"|<code><nowiki>{{ | + | |style="padding: 20px"|<code><nowiki>{{Infobox settlement/densdisp|Imperial|auto|auto|8400| |109|Canada}}</nowiki></code> |
| − | |style="padding: 20px"|{{ | + | |style="padding: 20px"|{{Infobox settlement/densdisp|Imperial|auto|auto|8400| |109|Canada}} |
|- | |- | ||
| − | |style="padding: 20px"|<code><nowiki>{{ | + | |style="padding: 20px"|<code><nowiki>{{Infobox settlement/densdisp|metric|auto|auto|8400| |109|Canada}}</nowiki></code> |
| − | |style="padding: 20px"|{{ | + | |style="padding: 20px"|{{Infobox settlement/densdisp|metric|auto|auto|8400| |109|Canada}} |
|} | |} | ||
=== See also === | === See also === | ||
| − | *{{ | + | *{{Tl|Infobox settlement}} |
| − | *{{ | + | *{{Tl|Infobox settlement/areadisp}} |
| − | *{{ | + | *{{Tl|Infobox settlement/lengthdisp}} |
| − | *{{ | + | *{{Tl|Infobox settlement/checkauto}} |
| − | *{{ | + | *{{Tl|Infobox settlement/permi2km2}} |
<includeonly> | <includeonly> | ||
Revision as of 13:27, 15 July 2010
| This is a documentation subpage for Template:Infobox settlement/densdisp. It contains usage information, categories and other content that is not part of the original template page. |
This subtemplate of {{Infobox settlement}} displays a metric/imperial pair of population density values for a line in the main infobox.
Usage
{{Infobox settlement/densdisp|unit_pref|DENSsqmi|DENSkm2|POP|AREAsqmi|AREAkm2|subdivision_name}}
where DENSsqmi and DENSkm2 are the density values to be displayed (one may be blank for automatic conversion if the other is numeric; or they may be set to auto for automatic calculation if POP and the corresponding AREA... parameter are present). Other parameters are taken from {{infobox settlement}}.
Whether the metric or imperial value is displayed first depends on the value of subdivision_name (usually the country name) and unit_pref (which can be set to Imperial to force imperial-first display). The default for non-US non-UK countries is metric first.
Rounding is always to one decimal place; the units are not wikilinked (compare {{infobox settlement/areadisp}}).
| Code | Result |
|---|---|
{{Infobox settlement/densdisp|Imperial|auto| |8400|42| |Canada}}
|
|
{{Infobox settlement/densdisp|metric|auto| |8400|42| |Canada}}
|
|
{{Infobox settlement/densdisp|Imperial|auto| |8400| |109|Canada}}
|
|
{{Infobox settlement/densdisp|metric|auto| |8400| |109|Canada}}
|
|
{{Infobox settlement/densdisp|Imperial|auto|auto|8400|42| |Canada}}
|
|
{{Infobox settlement/densdisp|metric|auto|auto|8400|42| |Canada}}
|
|
{{Infobox settlement/densdisp|Imperial|auto|auto|8400| |109|Canada}}
|
|
{{Infobox settlement/densdisp|metric|auto|auto|8400| |109|Canada}}
|
See also
- {{Infobox settlement}}
- {{Infobox settlement/areadisp}}
- {{Infobox settlement/lengthdisp}}
- {{Infobox settlement/checkauto}}
- {{Infobox settlement/permi2km2}}