Difference between revisions of "Template:Database"

From Wikishire
Jump to: navigation, search
Line 51: Line 51:
 
|HCS code=ANM
 
|HCS code=ANM
 
|population 2001=
 
|population 2001=
|population=618108
+
|population=605154
 
}}
 
}}
 
|Argyll
 
|Argyll
Line 79: Line 79:
 
|HCS code=ARH
 
|HCS code=ARH
 
|population 2001=159085
 
|population 2001=159085
|population=174792
+
|population=174960
 
}}
 
}}
 
|Ayrshire={{#switch:{{{2}}}
 
|Ayrshire={{#switch:{{{2}}}
Line 379: Line 379:
 
|HCS code=DWN
 
|HCS code=DWN
 
|population 2001=
 
|population 2001=
|population=531665
+
|population=519038
 
}}
 
}}
 
|Dumfriesshire={{#switch:{{{2}}}
 
|Dumfriesshire={{#switch:{{{2}}}
Line 458: Line 458:
 
|HCS code=FRM
 
|HCS code=FRM
 
|population 2001=57527
 
|population 2001=57527
|population=61170
+
|population=56861
 
}}
 
}}
 
|Fife={{#switch:{{{2}}}
 
|Fife={{#switch:{{{2}}}
Line 693: Line 693:
 
|HCS code=LDR
 
|HCS code=LDR
 
|population 2001=233500
 
|population 2001=233500
|population=247132
+
|population=243126
 
}}
 
}}
 
|Merionethshire={{#switch:{{{2}}}
 
|Merionethshire={{#switch:{{{2}}}
Line 1,109: Line 1,109:
 
|HCS code=TYN
 
|HCS code=TYN
 
|population 2001=166516
 
|population 2001=166516
|population=177986
+
|population=173290
 
}}
 
}}
 
|Warwickshire={{#switch:{{{2}}}
 
|Warwickshire={{#switch:{{{2}}}

Revision as of 17:26, 17 November 2015

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.