Template:Database: Difference between revisions

From Wikishire
Jump to navigation Jump to search
No edit summary
No edit summary
Line 142: Line 142:
|Chapman code=BEW
|Chapman code=BEW
|HCS code=BRW
|HCS code=BRW
|population 2001=
|population 2001=23,969
|population 2011=
|population 2011=
}}
}}
Line 285: Line 285:
|Chapman code=CON
|Chapman code=CON
|HCS code=CNW
|HCS code=CNW
|population 2001=
|population 2001=499,114
|population 2011=
|population 2011=
}}
}}
Line 691: Line 691:
|Chapman code=LDY
|Chapman code=LDY
|HCS code=LDR
|HCS code=LDR
|population 2001=
|population 2001=233,500
|population 2011=
|population 2011=
}}
}}
Line 964: Line 964:
|Chapman code=RUT
|Chapman code=RUT
|HCS code=RTL
|HCS code=RTL
|population 2001=
|population 2001=34,563
|population 2011=
|population 2011=
}}
}}
Line 1,003: Line 1,003:
|Chapman code=SAL
|Chapman code=SAL
|HCS code=SHP
|HCS code=SHP
|population 2001=
|population 2001=441,498
|population 2011=
|population 2011=
}}
}}
Line 1,081: Line 1,081:
|Chapman code=SSX
|Chapman code=SSX
|HCS code=SUS
|HCS code=SUS
|population 2001=
|population 2001=1,493,755
|population 2011=
|population 2011=
}}
}}
Line 1,107: Line 1,107:
|Chapman code=TYR
|Chapman code=TYR
|HCS code=TYN
|HCS code=TYN
|population 2001=
|population 2001=166,516
|population 2011=
|population 2011=
}}
}}

Revision as of 07:46, 14 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:
{{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.