Difference between revisions of "Template:Country"

From Conservapedia
Jump to: navigation, search
(ADDING example code)
(Undo revision 1710718 by United States (talk): okay, i don't want to waste my time editing 250 countries ALL OVER.)
 
(90 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<includeonly>{| class="wikitable" style="float:right; font-size:85%"
+
<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>
 
! 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}}
 
<!--
 
<!--
     MAP
+
     MAPS
 
-->
 
-->
 
{{#if:{{{map|}}}
 
{{#if:{{{map|}}}
 
  |{{!}}-
 
  |{{!}}-
  {{!}}colspan="2"{{!}}[[image:{{{map}}}{{!}}300px{{!}}center]]
+
  {{!}}colspan="2"{{!}}[[image:{{{map}}}{{!}}200px{{!}}center]]
 +
|}}
 +
{{#if:{{{map2|}}}
 +
|{{!}}-
 +
{{!}}colspan="2" style="border-top:0px"{{!}}[[image:{{{map2}}}{{!}}200px{{!}}center]]
 
|}}
 
|}}
 
<!--
 
<!--
 
     FLAG
 
     FLAG
 
-->
 
-->
{{t row if|Flag|{{#if:{{{flag|}}}|[[image:{{{flag}}}{{!}}100px{{!}}center]]|}}}}
+
{{#if:{{{flag|}}}
<!--
+
|{{#if:{{{arms|}}}
    COAT OF 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]]|}}}}
 
{{t row if|Coat of arms|{{#if:{{{arms|}}}|[[image:{{{arms}}}{{!}}100px{{!}}center]]|}}}}
<!--
+
 
 
     CAPITAL  
 
     CAPITAL  
 
-->
 
-->
Line 25: Line 48:
 
{{t row if|Government|{{{government|}}}|link=yes|col2txt={{{government-raw|}}}}}
 
{{t row if|Government|{{{government|}}}|link=yes|col2txt={{{government-raw|}}}}}
 
<!--
 
<!--
     OFFICIAL LANGUAGE
+
     (un) OFFICIAL LANGUAGE(S)
 
-->
 
-->
 
{{#if:{{{language|}}}
 
{{#if:{{{language|}}}
 
  |{{!}}-
 
  |{{!}}-
  {{!}}Official language{{!}}{{!}}[[{{{language}}} language{{!}}{{{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
 
     MONARCHS
 
-->
 
-->
{{#if:{{{monarch-raw|}}}
+
{{#switch: {{#if:{{{king|}}}|1|0}}|1={{!-}}
|{{t row if|Monarch|col2txt={{{monarch-raw}}}}}
+
{{!}}Monarch{{!}}{{!}}King [[{{{king}}}]]{{#if:{{{queen|}}}|<br/>Queen [[{{{queen}}}]]}}|0={{#if:{{{queen|}}}|{{!-}}
|{{t row if|Monarch|col2txt={{2if1|{{{queen|}}}|[[{{{queen}}}{{!}}Queen {{{queen}}}]]}}}}
+
{{!}}Monarch{{!}}{{!}}Queen [[{{{queen}}}]]|{{#if:{{{monarch-raw|}}}|{{!-}}
  {{t row if|Monarch|col2txt={{2if1|{{{king|}}}|[[{{{king}}}{{!}}King {{{king}}}]]}}}}
+
{{!}}Monarch{{!}}{{!}}{{{monarch-raw}}}}}}}}}
}}
+
<!--
 +
    GOVERNOR GENERAL
 +
-->
 +
{{t row if|Governor General|{{{governor general|}}}|link=yes|col2txt={{{governor general-raw|}}}}}
 
<!--
 
<!--
 
     PRESIDENT
 
     PRESIDENT
Line 51: Line 81:
 
-->
 
-->
 
{{t row if|Prime minister|{{{pm|}}}|link=yes|col2txt={{{pm-raw|}}}}}
 
{{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
 
     AREA
 
-->
 
-->
{{t row if|Area|{{{area|}}}}}
+
{{t row if|[[List of countries by area|Area]]|{{{area|}}}}}
 
<!--
 
<!--
 
     POPULATION
 
     POPULATION
 
-->
 
-->
{{t row if|Population {{{pop-basis}}}|{{{pop|}}}}}
+
{{t row if|[[List of countries by population|Population]] {{{pop-basis|}}}|{{{pop|}}}}}
 
<!--
 
<!--
 
     GDP
 
     GDP
 
-->
 
-->
{{t row if|GDP {{{gdp-year}}}|{{{gdp|}}}}}
+
{{t row if|[[List of countries by GDP|GDP]] {{{gdp-year}}}|{{{gdp|}}}}}
 
<!--
 
<!--
 
     GDP PER CAPITA
 
     GDP PER CAPITA
 
-->
 
-->
{{t row if|GDP per capita|{{{gdp-pc|}}}}}
+
{{t row if|[[List of countries by GDP per capita|GDP per capita]]|{{{gdp-pc|}}}}}
 
<!--
 
<!--
 
     CURRENCY
 
     CURRENCY
Line 81: Line 127:
 
|}
 
|}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
{{TemplateDoc|pages=Country articles|purpose=Info box|cat=}}
+
'''Note: .gif images do not work with this template.'''
 +
{{TemplateDoc|pages=Articles about countries, states, or territories|purpose=Info box|cat=}}
 
{{Parms|
 
{{Parms|
  {{Parm|name|name of country|no|Defaults to page name}}
+
  {{Parm|name|name of country, state, or territory|no|Defaults to page name}}
 
  {{Parm|map|map image|no|}}
 
  {{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|flag|flag image|no|}}
 
  {{Parm|arms|Coat of arms|no|}}
 
  {{Parm|arms|Coat of arms|no|}}
Line 90: Line 142:
 
  {{Parm|capital-raw|Capital|no|See note A}}
 
  {{Parm|capital-raw|Capital|no|See note A}}
 
  {{Parm|government|Type of government|no|Is automatically linked}}
 
  {{Parm|government|Type of government|no|Is automatically linked}}
  {{Parm|government-raw|Type-of-government|no|See note A}}
+
  {{Parm|government-raw|Type of government|no|See note A}}
  {{Parm|language|Official language|no|Is automatically linked (see note B)}}
+
  {{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|king|King|no|Is automatically linked. See note C}}
 
  {{Parm|queen|Queen|no|Is automatically linked.  See note C}}
 
  {{Parm|queen|Queen|no|Is automatically linked.  See note C}}
  {{Parm|monarch-raw|Monarch|no|See note A}}
+
  {{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|President|no|Is automatically linked}}
 
  {{Parm|president-raw|President|no|See note A}}
 
  {{Parm|president-raw|President|no|See note A}}
Line 101: Line 156:
 
  {{Parm|pm|Prime Minister|no|Is automatically linked}}
 
  {{Parm|pm|Prime Minister|no|Is automatically linked}}
 
  {{Parm|pm-raw|Prime Minister|no|See note A}}
 
  {{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|area|Area of country|no|}}
 
  {{Parm|pop|Population|no|}}
 
  {{Parm|pop|Population|no|}}
Line 114: Line 175:
 
  {{Parm||||}}-->
 
  {{Parm||||}}-->
 
}}
 
}}
'''NOTE 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 {{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.
+
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.
  
'''NOTE B:'''  The language field is automatically linked to an article named "''<language>'' language".
+
'''B:'''  The language field is automatically linked to an article named "''<language>'' language".
  
'''NOTE 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'' field.
+
'''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==
 
==Full code==
Line 135: Line 210:
 
|queen         =
 
|queen         =
 
|monarch-raw =
 
|monarch-raw =
 +
|governor general=
 +
|governor general-raw=
 
|president =
 
|president =
 
|president-raw =
 
|president-raw =
Line 141: Line 218:
 
|pm         =
 
|pm         =
 
|pm-raw         =
 
|pm-raw         =
 +
|chairman      =
 +
|general secretary=
 +
|governor      =
 +
|governor-raw  =
 +
|premier        =
 +
|premier-raw    =
 
|area         =
 
|area         =
 
|pop         =
 
|pop         =

Latest revision as of 00:12, 5 December 2020

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            =
}}