Difference between revisions of "Template:State2"

From Wikishire
Jump to: navigation, search
(Created page with '{{#switch:{{Part-BI|{{{1}}} }} |Republic of Ireland=the Republic of Ireland |England |Northern Ireland |Scotland |Wales=the United Kingdom |Guernsey |Bailiwick of Guernsey |Jerse…')
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch:{{Part-BI|{{{1}}} }}
+
{{#switch:{{Part-BI|{{namefix|{{{1}}} }} }}
 
|Republic of Ireland=the Republic of Ireland
 
|Republic of Ireland=the Republic of Ireland
 
|England
 
|England
Line 10: Line 10:
 
|Bailiwick of Jersey=the Channel Islands
 
|Bailiwick of Jersey=the Channel Islands
 
|Isle of Man=the Isle of Man
 
|Isle of Man=the Isle of Man
|the British overseas territories}}
+
|the British overseas territories}}<noinclude>[[Category:Wider placing templates|State 2]]
 +
{{Wider placing templates/doc}}</noinclude>

Latest revision as of 17:41, 12 August 2016

the British overseas territories


The Wider placing templates are amongst the 'Categorisation templates'. These templates work as sub-routines embedded in other templates, to locate places in a wider context. Each takes a single parameter, which is the name of a county or overseas territory, and returns its wider context.

{{Part-BI}} determines whether the county is part of England, Northern Ireland, Scotland, Wales, the Republic of Ireland or an overseas territory / Crown dependency. This is of use in, for example determining whether a "Places of Interest" box should display the name and logo of English Heritage, the NIAE, Historic Environment Scotland, Cadw etc, and which National Trust is referred to when {{Infobox NT}} is used. Certain in-line templates such as {{britlist}}, {{charity}}, {{sssi}} point to an external source, and {{Part-BI}} (embedded in each) directs then to the right sub-national register.

The other templates determine whether the place is in in the United Kingdom, in the Republic of Ireland, in the overseas territories etc. This means that, for example a categorisation template like {{Bridges}} will know to categorise the category in "Bridges in the United Kingdom" or "Bridges in the Republic of Ireland", etc.

In each case, the template needs the (Wikishire) standard form of name as the parameter, so {{namefix}} should generally be used with it.

Examples:

{{Part-BI|Angus}} => Scotland
{{State-BI|Angus}} => United Kingdom
{{State|Angus}} => the United Kingdom

The templates

The templates are:

{{Part-BI}} Returns: 'England', 'Northern Ireland', 'Scotland', 'Republic of Ireland', 'Wales', or the name of an overseas territory / Crown dependency
{{State-BI}} Returns: 'United Kingdom', 'Republic of Ireland', or 'Isle of Man' (mainly for choosing between Wikishire mapping or Googlemaps).
{{State2}} Almost identical, but returns the name with "the" in front, so we get categories "X in the United Kingdom" not "X in United Kingdom", and it includes "the British overseas territories" and "the Channel Islands"