Difference between revisions of "Template:Country"

From Conservapedia
Jump to: navigation, search
(Replaced content with "These infoboxes are awful. Wikipedia is so much better.")
m (Reverted edits by DrOwl (talk) to last revision by United States)
Line 1: Line 1:
These infoboxes are awful. Wikipedia is so much better.
+
<includeonly>{| class="infobox bordered" style="border-collapse:collapse; border:1px solid black;background:#CCFFCC; float:right; font-size:85%; width:46ex" cellpadding="4"
 +
! colspan="2"|<big>{{{name|{{PAGENAME}}}}}</big>
 +
<!--DATES & Recognition
 +
-->
 +
{{#if:{{{established|}}}|
 +
{{!-}}
 +
{{!}}colspan="2" style="font-size:92%;text-align:center"{{!}}{{#if:{{{dissolved|}}}||Established in&nbsp;}}{{{established}}}{{#if:{{{dissolved|}}}| - {{{dissolved}}}}}}}{{#switch:{{{recognized}}}|y=<br/>Recognized{{#if:{{{recognitionyears|}}}|<nowiki>:</nowiki>&nbsp;{{{recognitionyears}}}}}|n=<br/>Unrecognized state}}
 +
<!--
 +
    MAPS
 +
-->
 +
{{#if:{{{map|}}}
 +
|{{!}}-
 +
{{!}}colspan="2"{{!}}[[image:{{{map}}}{{!}}200px{{!}}center]]
 +
|}}
 +
{{#if:{{{map2|}}}
 +
|{{!}}-
 +
{{!}}colspan="2" style="border-top:0px"{{!}}[[image:{{{map2}}}{{!}}200px{{!}}center]]
 +
|}}
 +
<!--
 +
    FLAG
 +
-->
 +
{{#if:{{{flag|}}}
 +
|{{#if:{{{arms|}}}
 +
|
 +
{{!-}}
 +
{{!}}valign="center" {{!}}[[Image:{{{flag}}}{{!}}125px{{!}}center]]{{!}}{{!}}valign="center"{{!}}[[Image:{{{arms}}}{{!}}85px{{!}}center]]
 +
{{!-}}
 +
{{!}}style="text-align:center;border-top:0px"{{!}}Flag{{!}}{{!}}style="text-align:center;border-top:0px"{{!}}Coat of Arms
 +
|{{!-}}
 +
{{!}}colspan="2"{{!}}[[Image:{{{flag}}}{{!}}100px{{!}}center]]
 +
{{!-}}
 +
{{!}}colspan="2" style="text-align:center;border-top:0px;" {{!}}Flag}}|{{#if:{{{arms|}}}
 +
|{{!-}}
 +
{{!}}colspan="2"{{!}}[[Image:{{{arms}}}{{!}}100px{{!}}center]]
 +
{{!-}}
 +
{{!}}colspan="2" style="text-align:center;border-top:0px"{{!}}Coat of Arms}}}}<!--
 +
 
 +
{{t row if|Flag|{{#if:{{{flag|}}}|[[image:{{{flag}}}{{!}}101px{{!}}center]]|}}}}
 +
 
 +
{{t row if|Coat of arms|{{#if:{{{arms|}}}|[[image:{{{arms}}}{{!}}100px{{!}}center]]|}}}}
 +
 
 +
    CAPITAL
 +
-->
 +
{{t row if|Capital|{{{capital|}}}|link=yes|col2txt={{{capital-raw|}}}}}
 +
<!--
 +
    GOVERNMENT
 +
-->
 +
{{t row if|Government|{{{government|}}}|link=yes|col2txt={{{government-raw|}}}}}
 +
<!--
 +
    (un) OFFICIAL LANGUAGE(S)
 +
-->
 +
{{#if:{{{language|}}}
 +
|{{!}}-
 +
{{!}}[[List of languages by number of speakers|Language]]{{#if:{{{language2|}}}|s|}}{{!}}{{!}}[[{{{language}}}]]{{#ifeq:{{{official|y}}}|y|<small> (official)</small>|<small> (unofficial)</small>}}
 +
<!--
 +
    SECONDARY LANGUAGE
 +
-->
 +
{{#if:{{{language2|}}}|{{{language2}}}|}}
 +
|}}
 +
<!--
 +
    MONARCHS
 +
-->
 +
{{#switch: {{#if:{{{king|}}}|1|0}}|1={{!-}}
 +
{{!}}Monarch{{!}}{{!}}King [[{{{king}}}]]{{#if:{{{queen|}}}|<br/>Queen [[{{{queen}}}]]}}|0={{#if:{{{queen|}}}|{{!-}}
 +
{{!}}Monarch{{!}}{{!}}Queen [[{{{queen}}}]]|{{#if:{{{monarch-raw|}}}|{{!-}}
 +
{{!}}Monarch{{!}}{{!}}{{{monarch-raw}}}}}}}}}
 +
<!--
 +
    GOVERNOR GENERAL
 +
-->
 +
{{t row if|Governor General|{{{governor general|}}}|link=yes|col2txt={{{governor general-raw|}}}}}
 +
<!--
 +
    PRESIDENT
 +
-->
 +
{{t row if|President|{{{president|}}}|link=yes|col2txt={{{president-raw|}}}}}
 +
<!--
 +
    CHANCELLOR
 +
-->
 +
{{t row if|Chancellor|{{{chancellor|}}}|link=yes|col2txt={{{chancellor-raw|}}}}}
 +
<!--
 +
    PRIME MINISTER
 +
-->
 +
{{t row if|Prime minister|{{{pm|}}}|link=yes|col2txt={{{pm-raw|}}}}}
 +
<!--
 +
    CHAIRMAN
 +
-->
 +
{{t row if|Chairman|{{{chairman|}}}|link=yes}}
 +
<!--
 +
    GENERAL SECRETARY
 +
-->
 +
{{t row if|General Secretary|{{{general secretary|}}}|link=yes}}
 +
<!--
 +
    GOVERNOR
 +
-->
 +
{{t row if|Governor|{{{governor|}}}|link=yes|col2txt={{{governor-raw|}}}}}
 +
<!--
 +
    PREMIER
 +
-->
 +
{{t row if|Premier|{{{premier|}}}|link=yes|col2txt={{{premier-raw|}}}}}
 +
<!--
 +
    AREA
 +
-->
 +
{{t row if|[[List of countries by area|Area]]|{{{area|}}}}}
 +
<!--
 +
    POPULATION
 +
-->
 +
{{t row if|[[List of countries by population|Population]] {{{pop-basis|}}}|{{{pop|}}}}}
 +
<!--
 +
    GDP
 +
-->
 +
{{t row if|[[List of countries by GDP|GDP]] {{{gdp-year}}}|{{{gdp|}}}}}
 +
<!--
 +
    GDP PER CAPITA
 +
-->
 +
{{t row if|[[List of countries by GDP per capita|GDP per capita]]|{{{gdp-pc|}}}}}
 +
<!--
 +
    CURRENCY
 +
-->
 +
{{t row if|Currency|{{{currency|}}}}}
 +
<!--
 +
    DIALING PREFIX
 +
-->
 +
{{t row if|International dialing code|{{{idd|}}}}}
 +
<!--
 +
    INTERNET
 +
-->
 +
{{t row if|Internet top-level domain|{{{tld|}}}}}
 +
|}
 +
</includeonly><noinclude>
 +
'''Note: .gif images do not work with this template.'''
 +
{{TemplateDoc|pages=Articles about countries, states, or territories|purpose=Info box|cat=}}
 +
{{Parms|
 +
{{Parm|name|name of country, state, or territory|no|Defaults to page name}}
 +
{{Parm|map|map image|no|}}
 +
{{Parm|map2|map2 image|no|}}
 +
{{Parm|established|When was independence declared |no|}}
 +
{{Parm|dissolved|When the country dissolved|no|}}
 +
{{Parm|recognized|Is the country recognized (y or n)|no|}}
 +
{{Parm|recognitionyears|When was the country recognized (include "present" (example:1783-present))|no|}}
 +
{{Parm|flag|flag image|no|}}
 +
{{Parm|arms|Coat of arms|no|}}
 +
{{Parm|capital|Capital|no|Is automatically linked}}
 +
{{Parm|capital-raw|Capital|no|See note A}}
 +
{{Parm|government|Type of government|no|Is automatically linked}}
 +
{{Parm|government-raw|Type of government|no|See note A}}
 +
{{Parm|language|Language|no|Is automatically linked (see note B)}}
 +
{{Parm|official|Official language|no|Is the language official? (either y or n)}}
 +
{{Parm|king|King|no|Is automatically linked. See note C}}
 +
{{Parm|queen|Queen|no|Is automatically linked.  See note C}}
 +
{{Parm|monarch-raw|Monarch|no|See notes A and C}}
 +
{{Parm|governor general|Governor General|no|Is automatically linked}}
 +
{{Parm|governor general-raw|Governor General|no|See note A}}
 +
{{Parm|president|President|no|Is automatically linked}}
 +
{{Parm|president-raw|President|no|See note A}}
 +
{{Parm|chancellor|Chancellor|no|Is automatically linked}}
 +
{{Parm|chancellor-raw|Chancellor|no|See note A}}
 +
{{Parm|pm|Prime Minister|no|Is automatically linked}}
 +
{{Parm|pm-raw|Prime Minister|no|See note A}}
 +
{{Parm|chairman|Chairman|no|Is automatically linked}}
 +
{{Parm|general secretary|General Secretary|no|Is automatically linked}}
 +
{{Parm|governor|Governor|no|Is automatically linked}}
 +
{{Parm|governor-raw|Governor|no|See note A}}
 +
{{Parm|premier|Premier|no|Is automatically linked}}
 +
{{Parm|premier-raw|Premier|no|See note A}}
 +
{{Parm|area|Area of country|no|}}
 +
{{Parm|pop|Population|no|}}
 +
{{Parm|pop-basis|Basis of population (e.g. "2004 census")|yes|Only required if pop is supplied}}
 +
{{Parm|gdp|GDP|no|}}
 +
{{Parm|gdp-year|GDP year|yes|Only required if gdp is supplied}}
 +
{{Parm|gdp-pc|GDP per capita|no|}}
 +
{{Parm|currency|Currency|no|}}
 +
{{Parm|idd|International dialing code|no|}}
 +
{{Parm|tld|Internet top-level domain|no|}}
 +
<!--{{Parm||||}}
 +
{{Parm||||}}
 +
{{Parm||||}}-->
 +
}}
 +
The '''country''' infobox template is currently used for countries, states, and territories (the {{tl|state}} template redirects to this template).  However, it is possible that {{tl|state}} may be an independent template in the future, so {{tl|state}}, not this template, should be used for a state infobox.
 +
 
 +
The template is not especially complex (but is reasonably so), but includes a large list of optional parameters.
 +
 
 +
Many of the parameters have two alternative forms, which are explained below in note A.
 +
 
 +
== Notes ==
 +
 
 +
'''A:'''  Parameters of the form {{tt|xxxx-raw}} are alternatives to the non-raw form.  These should be used ''instead of'' the non-raw form to (a) provide links where the article name is different to the displayed name, or (b) where a link is not wanted.
 +
 
 +
For example, if the capital of a country is ''Washington'', but the page name for that capital is ''Washington D.C.'', then you would type {{tt|<nowiki>capital-raw=[[Washington D.C.|Washington]]</nowiki>}}.
 +
 
 +
If, instead, the page name is simply ''Washington'', then {{tt|<nowiki>capital=Washington</nowiki>}} is all that is needed, and will automatically be linked.
 +
 
 +
If both non-raw and raw forms are supplied, the non-raw form will be ignored.
 +
 
 +
'''B:'''  The language field is automatically linked to an article named "''<language>'' language".
 +
 
 +
'''C:'''  Both the ''king''  and ''queen'' parameters display as a ''Monarch'' row, but prepend "King" or "Queen" to the name of the monarch.  If neither is required, use the ''monarch-raw'' parameter.
 +
 
 +
==Full code==
 +
<pre>
 +
{{Country
 +
|name          =
 +
|map         =
 +
|flag         =
 +
|arms         =
 +
|capital =
 +
|capital-raw =
 +
|government =
 +
|government-raw =
 +
|language =
 +
|king         =
 +
|queen         =
 +
|monarch-raw =
 +
|governor general=
 +
|governor general-raw=
 +
|president =
 +
|president-raw =
 +
|chancellor =
 +
|chancellor-raw =
 +
|pm         =
 +
|pm-raw         =
 +
|chairman      =
 +
|general secretary=
 +
|governor      =
 +
|governor-raw  =
 +
|premier        =
 +
|premier-raw    =
 +
|area         =
 +
|pop         =
 +
|pop-basis =
 +
|gdp         =
 +
|gdp-year =
 +
|gdp-pc         =
 +
|currency =
 +
|idd =
 +
|tld            =
 +
}}
 +
</pre>
 +
</noinclude>

Revision as of 20:01, May 5, 2021

Note: .gif images do not work with this template.


Template: Country
Use on Articles about countries, states, or territories
Use for Info box
Category template applies to page (none)
Template Parameters
(See using templates).
Name Purpose Required? Comment
name name of country, state, or territory no Defaults to page name
map map image no
map2 map2 image no
established When was independence declared no
dissolved When the country dissolved no
recognized Is the country recognized (y or n) no
recognitionyears When was the country recognized (include "present" (example:1783-present)) no
flag flag image no
arms Coat of arms no
capital Capital no Is automatically linked
capital-raw Capital no See note A
government Type of government no Is automatically linked
government-raw Type of government no See note A
language Language no Is automatically linked (see note B)
official Official language no Is the language official? (either y or n)
king King no Is automatically linked. See note C
queen Queen no Is automatically linked. See note C
monarch-raw Monarch no See notes A and C
governor general Governor General no Is automatically linked
governor general-raw Governor General no See note A
president President no Is automatically linked
president-raw President no See note A
chancellor Chancellor no Is automatically linked
chancellor-raw Chancellor no See note A
pm Prime Minister no Is automatically linked
pm-raw Prime Minister no See note A
chairman Chairman no Is automatically linked
general secretary General Secretary no Is automatically linked
governor Governor no Is automatically linked
governor-raw Governor no See note A
premier Premier no Is automatically linked
premier-raw Premier no See note A
area Area of country no
pop Population no
pop-basis Basis of population (e.g. "2004 census") yes Only required if pop is supplied
gdp GDP no
gdp-year GDP year yes Only required if gdp is supplied
gdp-pc GDP per capita no
currency Currency no
idd International dialing code no
tld Internet top-level domain no

The country infobox template is currently used for countries, states, and territories (the {{state}} template redirects to this template). However, it is possible that {{state}} may be an independent template in the future, so {{state}}, not this template, should be used for a state infobox.

The template is not especially complex (but is reasonably so), but includes a large list of optional parameters.

Many of the parameters have two alternative forms, which are explained below in note A.

Notes

A: Parameters of the form xxxx-raw are alternatives to the non-raw form. These should be used instead of the non-raw form to (a) provide links where the article name is different to the displayed name, or (b) where a link is not wanted.

For example, if the capital of a country is Washington, but the page name for that capital is Washington D.C., then you would type capital-raw=[[Washington D.C.|Washington]].

If, instead, the page name is simply Washington, then capital=Washington is all that is needed, and will automatically be linked.

If both non-raw and raw forms are supplied, the non-raw form will be ignored.

B: The language field is automatically linked to an article named "<language> language".

C: Both the king and queen parameters display as a Monarch row, but prepend "King" or "Queen" to the name of the monarch. If neither is required, use the monarch-raw parameter.

Full code

{{Country
|name           =
|map	        =
|flag	        =
|arms	        =
|capital	=
|capital-raw	=
|government	=
|government-raw	=
|language	=
|king	        =
|queen	        =
|monarch-raw	=
|governor general=
|governor general-raw=
|president	=
|president-raw	=
|chancellor	=
|chancellor-raw	=
|pm	        =
|pm-raw	        =
|chairman       =
|general secretary=
|governor       =
|governor-raw   =
|premier        =
|premier-raw    =
|area	        =
|pop	        =
|pop-basis	=
|gdp	        =
|gdp-year	=
|gdp-pc	        =
|currency	=
|idd		=
|tld            =
}}