Template:Database: Difference between revisions

From Wikishire
Jump to navigation Jump to search
mNo edit summary
RB (talk | contribs)
mNo edit summary
Line 543: Line 543:
|county town=Hertford
|county town=Hertford
|area=727
|area=727
|flag=FlagOfHertfordshire.PNG
|flag=County Flag of Hertfordshire.svg
|badge=Hertford shield.svg
|badge=Hertford shield.svg
|Chapman code=HRT
|Chapman code=HRT
Line 843: Line 843:
|county town=Kirkwall
|county town=Kirkwall
|area=376
|area=376
|flag=2007 Flag of Orkney.svg
|flag=Orkney county flag.svg
|badge=2007 Flag of Orkney.svg
|badge=Orkney county flag.svg
|Chapman code=OKI
|Chapman code=OKI
|HCS code=ORN
|HCS code=ORN
Line 1,077: Line 1,077:
|county town=Chichester
|county town=Chichester
|area=1458
|area=1458
|flag=FlagOfSussex.PNG
|flag=Flag of Sussex.svg
|badge=Sussex shield.svg
|badge=Sussex shield.svg
|Chapman code=SSX
|Chapman code=SSX

Revision as of 22:09, 23 February 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.