Template:Database: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 491: | Line 491: | ||
|county town=Cardiff | |county town=Cardiff | ||
|area=845 | |area=845 | ||
|flag= | |flag=Glamorgan Flag.png | ||
|badge=Iestyn & De Clare - Glamorgan shields.svg | |badge=Iestyn & De Clare - Glamorgan shields.svg | ||
|Chapman code=GLA | |Chapman code=GLA | ||
Line 882: | Line 882: | ||
|county town=Pembroke | |county town=Pembroke | ||
|area=655 | |area=655 | ||
|flag= | |flag=Flag of Pembrokeshire.svg | ||
|badge= | |badge=Flag of Pembrokeshire.svg | ||
|Chapman code=PEM | |Chapman code=PEM | ||
|HCS code=PMB | |HCS code=PMB |
Revision as of 05:54, 25 September 2013
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.