Template:Infobox country: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>David Kernow rm whitespace apparently produced by ethnic groups code |
meta>David Kernow Making remaning required parameters optional for sake of more complex territorial situations (e.g. see Abkhazia) |
||
Line 17: | Line 17: | ||
<!---------------------------------------Names-----------------------------------------> | <!---------------------------------------Names-----------------------------------------> | ||
<tr> <th colspan="3" class="mergedtoprow" align="center" style="line-height:1.2em; font-size:1.2em;"><!-- | <tr> | ||
<th colspan="3" class="mergedtoprow" align="center" style="line-height:1.2em; font-size:1.2em;"><!-- | |||
-->{{#if:{{{native_name|}}} | |||
|<!--then:-->{{{native_name}}} {{#if:{{{conventional_long_name|}}} | |||
|<!--then:--><br/>{{{conventional_long_name}}}<!-- | |||
-->}}<!-- | |||
-->|<!--else:-->{{#if:{{{conventional_long_name|}}} | |||
|<!--then:-->{{{conventional_long_name}}}<!-- | |||
-->|<!--else:-->'''''Infobox error: parameters needed'''''<!-- | |||
-->}}<!-- | |||
-->}}<!-- | |||
--></th> | |||
</tr> | </tr> | ||
Line 80: | Line 83: | ||
{{#if:{{{image_map|}}} | {{#if:{{{image_map|}}} | ||
|<!--then:--> | |<!--then:--> | ||
<tr> <td colspan="3" style="text-align:center; padding:0.6em 0em 0.6em 0em;"> [[Image:{{{image_map}}}|250px|center|Location of {{{common_name|{{PAGENAME}}}}}]] <small>{{{map_caption|<noinclude>{{{map_caption}}}</noinclude>}}}</small></td> | <tr> | ||
<td colspan="3" style="text-align:center; padding:0.6em 0em 0.6em 0em;"> [[Image:{{{image_map}}}|250px|center|Location of {{{common_name|{{PAGENAME}}}}}]] {{lower|5px|<small>{{{map_caption|<noinclude>{{{map_caption}}}</noinclude>}}}</small>}} | |||
</td> | |||
</tr> | </tr> | ||
}} | }} | ||
Line 87: | Line 92: | ||
|<!--then:--> | |<!--then:--> | ||
<tr class="mergedtoprow"> | <tr class="mergedtoprow"> | ||
<td colspan="3" style="text-align:center; padding:0.6em 0em 0.6em 0em;"> [[Image:{{{image_map2}}}|250px|center|Location of {{{common_name|{{PAGENAME}}}}}]] <small>{{{map_caption2|}}}</small></td> | <td colspan="3" style="text-align:center; padding:0.6em 0em 0.6em 0em;"> [[Image:{{{image_map2}}}|250px|center|Location of {{{common_name|{{PAGENAME}}}}}]] {{lower|5px|<small>{{{map_caption2|}}}</small>}} | ||
</td> | |||
</tr> | </tr> | ||
}} | }} | ||
Line 93: | Line 99: | ||
<!------------------------Capital, Largest city or settlement--------------------------> | <!------------------------Capital, Largest city or settlement--------------------------> | ||
<tr class="mergedtoprow"> | {{#if:{{{capital|}}}{{{largest_city|}}}{{{largest_settlement|}}} | ||
|<!--then1:--> | |||
<tr class="mergedtoprow"> | |||
<!--------------------------------------------------------------------------- | |||
If capital provided, check whether largest_city or largest_settlement | |||
(if provided) equals "capital", capital or [[capital]]: | |||
----------------------------------------------------------------------------> | |||
{{#if:{{{capital|}}} | |||
|<!--then2:--> | |||
<td colspan="2" style="vertical-align:middle;">'''[[List of national capitals|Capital]]'''<!-- | |||
-->{{#ifeq: {{#ifeq:{{{largest_city|}}}{{{largest_settlement|}}} | |||
|<!--equals3:-->capital | |||
|<!---then3:--->capital<!-- | |||
-->|<!---else3:---><!-- | |||
-->{{#switch:{{{capital}}} | |||
| [[{{{largest_city|}}}{{{largest_settlement|}}}]] = capital | |||
| {{{largest_city|}}}{{{largest_settlement|}}} = capital | |||
| not capital | |||
}} | |||
}}<!--(end3)--> | |||
|<!--equals4:-->capital | |||
|<!---then4:---><!-- | |||
------------------------------------------------------------------ | |||
capital is largest_city or largest_settlement: | |||
------------------------------------------------------------------ | |||
--><br/>[[Demographics of {{{common_name}}}|(and {{{largest_settlement_type|largest city}}})]] | |||
</td> | |||
<!--------Add capital:--------> | |||
<td>{{{capital}}}<!--add capital's lati/longitude (if provided):--><!-- | |||
-->{{#if:{{{latd|}}} |<!--then:--><br/><small><!-- | |||
-->{{coor dm |{{{latd}}}|{{{latm}}}|{{{latNS}}}|{{{longd}}}<!-- | |||
-->|{{{longm}}}|{{{longEW}}}|type:country({{{area}}}) }}</small><!-- | |||
-->}}<!-- | |||
--></td> | |||
|<!---else4:---><!-- | |||
------------------------------------------------------------------ | |||
capital isn't largest_city or largest_settlement: | |||
------------------------------------------------------------------ | |||
--></td> | |||
<!--------Add capital:--------> | |||
<td>{{{capital}}}<!--add capital's lati/longitude (if provided):--><!-- | |||
-->{{#if:{{{latd|}}} |<!--then:--><br/><small><!-- | |||
-->{{coor dm |{{{latd}}}|{{{latm}}}|{{{latNS}}}|{{{longd}}}<!-- | |||
-->|{{{longm}}}|{{{longEW}}}|type:country({{{area}}}) }}</small><!-- | |||
-->}}<!-- | |||
--></td> | |||
</tr> | |||
<!--------Add largest_city or largest_settlement (if provided):--------> | |||
{{#if:{{{largest_city|}}}{{{largest_settlement|}}} | |||
|<!--then5:--> | |||
<tr class="mergedbottomrow"> | |||
<th colspan="2" style="vertical-align:middle;">[[Demographics of {{{common_name}}}|Largest {{{largest_settlement_type|city}}}]]</th> | |||
<td>{{{largest_city|}}}{{{largest_settlement|}}}</td> | |||
</tr> | |||
}}<!--(end5)--> | |||
}}<!--(end4)--> | |||
|<!--else2: capital not provided:--><!-- | |||
--------Add largest_city or largest_settlement (if provided):-------- | |||
-->{{#if:{{{largest_city|}}}{{{largest_settlement|}}} | |||
|<!--then6:--> | |||
<th colspan="2" style="vertical-align:middle;">[[Demographics of {{{common_name}}}|Largest {{{largest_settlement_type|city}}}]]</th> | |||
<td>{{{largest_city|}}}{{{largest_settlement|}}}</td> | |||
}}<!--(end6)--> | |||
}}<!--(end2)--> | |||
</tr> | |||
}}<!--(end1)--> | |||
Line 176: | Line 189: | ||
<!-------------------------------------Government--------------------------------------> | <!-------------------------------------Government--------------------------------------> | ||
<tr> <th colspan="2">[[List of countries by system of government|Government]]</th> | {{#if:{{{government_type|}}} | ||
|<!--then:--> | |||
</tr> | <tr> <th colspan="2">[[List of countries by system of government|Government]]</th> | ||
<td>{{{government_type|}}}</td> | |||
</tr> | |||
}} | |||
Line 321: | Line 337: | ||
</tr> | </tr> | ||
}} | }} | ||
<!-------------------------------------EU accession------------------------------------> | <!-------------------------------------EU accession------------------------------------> | ||
Line 332: | Line 349: | ||
<!-----------------------------------------Area-----------------------------------------> | <!-----------------------------------------Area-----------------------------------------> | ||
<tr class="mergedtoprow"> | {{#if:{{{area|}}} | ||
|<!--then:--> | |||
</tr> | <tr class="mergedtoprow"> | ||
<th colspan="3">[[List of countries and outlying territories by area|Area]]</th> | |||
</tr> | |||
<tr class="mergedrow"> | <tr class="mergedrow"> | ||
<td style="padding:0 0 0 0.6em;"> - </td> | |||
<td style="padding-left:0px;">Total<!-- | |||
---France-related footnote:-->{{#if:{{{FR_foot4|}}} | |||
|<!--then:-->{{{FR_foot4}}} }}</td> | |||
<td>[[{{{area_magnitude|}}} {{#if:{{{area_magnitude|}}} | |||
|<!--then:-->m²<!-- | |||
-->|<!--else:-->Square metre<!-- | |||
-->}}|{{{area|}}} km²<!-- | |||
-->]] {{#if:{{{area_rank|}}} | |||
|<!--then:-->([[List of countries and outlying territories by area|{{{area_rank}}}]]) }}<br/>{{{areami²|}}} [[Square mile|sq mi]] </td> | |||
</tr> | </tr> | ||
}} | |||
<!-------------------Percentage water--------------------> | <!-------------------Percentage water--------------------> | ||
Line 390: | Line 410: | ||
<!-------------------------------------Population-------------------------------------> | <!-------------------------------------Population-------------------------------------> | ||
{{#if:{{{population_estimate|}}}{{{population_census|}}} | |||
{{#if:{{{population_estimate|}}} | |||
|<!--then:--> | |<!--then:--> | ||
<tr class=" | <tr class="mergedtoprow"> | ||
< | <th colspan="3">[[List of countries by population|Population]]</th> | ||
</tr> | </tr> | ||
<!----------------Census----------------> | <!---------------Estimate---------------> | ||
{{#if:{{{population_census|}}} | {{#if:{{{population_estimate|}}} | ||
|<!--then:--> | |<!--then:--> | ||
<tr class="mergedrow"> | |||
<td style="padding:0 0 0 0.6em;"> - </td> | |||
<td style="padding-left:0px;">{{{population_estimate_year|}}} estimate</td> | |||
<td>{{{population_estimate|}}} {{#if:{{{population_estimate_rank|}}} | |||
|<!--then:-->([[List of countries by population|{{{population_estimate_rank}}}]]) }}</td> | |||
</tr> | |||
}} | |||
<!----------------Census----------------> | |||
{{#if:{{{population_census|}}} | |||
|<!--then:--> | |||
<tr class="mergedrow"> | |||
<td style="padding:0 0 0 0.6em;"> - </td> | |||
<td style="padding-left:0px;">{{{population_census_year|}}} census</td> | |||
<td>{{{population_census|}}} {{#if:{{{population_census_rank|}}} | |||
|([[List of countries by population|{{{population_census_rank}}}]]) }}</td> | |||
</tr> | |||
}} | |||
}} | }} | ||
Revision as of 02:42, 9 April 2007
This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. You can conduct experiments, and should test all major changes, in either this template's sandbox, the general template sandbox, or your user space before changing anything here. |