Difference between revisions of "Template:Database"

From Wikishire
Jump to: navigation, search
Line 430: Line 430:
 
|Chapman code=ELN
 
|Chapman code=ELN
 
|HCS code=ELT
 
|HCS code=ELT
|population 2001=
+
|population 2001=66,097
 
|population 2011=
 
|population 2011=
 
}}
 
}}
Line 469: Line 469:
 
|Chapman code=FIF
 
|Chapman code=FIF
 
|HCS code=FFE
 
|HCS code=FFE
|population 2001=
+
|population 2001=349,344
 
|population 2011=
 
|population 2011=
 
}}
 
}}
Line 482: Line 482:
 
|Chapman code=FLN
 
|Chapman code=FLN
 
|HCS code=FLT
 
|HCS code=FLT
|population 2001=
+
|population 2001=212,718
 
|population 2011=
 
|population 2011=
 
}}
 
}}
Line 495: Line 495:
 
|Chapman code=GLA
 
|Chapman code=GLA
 
|HCS code=GLM
 
|HCS code=GLM
|population 2001=
+
|population 2001=1,178,642
 
|population 2011=
 
|population 2011=
 
}}
 
}}
Line 573: Line 573:
 
|Chapman code=INV
 
|Chapman code=INV
 
|HCS code=INS
 
|HCS code=INS
|population 2001=
+
|population 2001=108,465
 
|population 2011=
 
|population 2011=
 
}}
 
}}
Line 599: Line 599:
 
|Chapman code=KCD
 
|Chapman code=KCD
 
|HCS code=KNC
 
|HCS code=KNC
|population 2001=
+
|population 2001=51,295
 
|population 2011=
 
|population 2011=
 
}}
 
}}
Line 612: Line 612:
 
|Chapman code=KRS
 
|Chapman code=KRS
 
|HCS code=KNR
 
|HCS code=KNR
|population 2001=
+
|population 2001=10,967
 
|population 2011=
 
|population 2011=
 
}}
 
}}
Line 938: Line 938:
 
|Chapman code=
 
|Chapman code=
 
|HCS code=RSS
 
|HCS code=RSS
|population 2001=71,536 (with Ross-shire)
+
|population 2001=71,536 (with Cromartyshire)
 
|population 2011=
 
|population 2011=
 
}}
 
}}

Revision as of 14:53, 7 September 2012

Template:Database is a general database constructed as the Mediawiki programme permits, as nested switch functions. The data may be extracted easily whether within an article or in a template.

The database contains counties, territories etc, but also units of measurement, which feed the "Convert" function of Template:Convert.

Examples

The following examples demonstrate how to extract data:

[[File:{{Database|Monmouthshire|flag}}|center|50px]] will give:
Flag of Monmouthshire.svg
{{Database|Monmouthshire|Welsh}} will give: Sir Fynwy

Caution: blank fields

Not every data field is completed nor can be. Care must therefore be taken to ensure that you still achieve the right result in every case.

The first example above but substituting "Ayrshire" in place of "Monmouthshire" would produce an error as there is no Ayrshire flag image, so an {{:if: or {{:ifeq: function should be used where there might be a blank field.