Difference between revisions of "Template:Infobox county"

From Wikishire
Jump to: navigation, search
m
 
(40 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| class="infobox geography vcard" style="width:22em; text-align:left; font-size: 88%; line-height: 1.5em" style="float: right; font-size: 85%"
+
{| class="infobox geography vcard" style="width:22em; text-align:left; font-size: 88%; line-height: 1.5em" style="float: right; font-size: 85%; border: 1px solid lightgrey; padding: 4px; margin-left: 1em;"
|colspan=2 class= style="text-align: center; background:#00FF00; "|<big class="fn org">'''{{namefix|{{{name}}} }}'''</big>{{#if: {{{welsh| }}}| <br>''{{lang|cy|{{{welsh}}} }}'' }}{{#if: {{{gaelic| }}}| <br>''{{lang|gd|{{{gaelic}}} }}'' }}{{#if: {{{irish| }}}| <br>''{{lang|ga|{{{irish}}} }}'' }}{{#if: {{{scots| }}}| <br>''{{lang|sco|{{{scots}}} }}'' }}<br>{{State-BI|{{namefix|{{{name}}} }} }}
+
|colspan=2 class= style="text-align: center; background:#D0F0C0; "|<big class="fn org">{{#vardefine:type|county}}{{#vardefine:shire|{{namefix|{{{name}}}}}}}{{#vardefine:state|{{State-BI|{{#var:shire}}}}}}{{#vardefine:partbi|{{Part-BI|{{#var:shire}}}}}}'''{{#var:shire}}'''</big>{{#if: {{{welsh| }}}| <br>{{lang|cy|{{{welsh}}} }} }}{{#if: {{{gaelic| }}}| <br>{{lang|gd|{{{gaelic}}} }} }}{{#if: {{{irish| }}}| <br>{{lang|ga|{{{irish}}} }} }}{{#if: {{{scots| }}}| <br>{{lang|sco|{{{scots}}} }} }}{{#if: {{{cornish| }}}| <br>{{lang|kw|{{{cornish}}} }} }}<br>{{#var:state}}
|-
+
{{#if: {{{map image<includeonly>|</includeonly>}}} |
+
! colspan=2 style="background: white; text-align: center; font-size: 85%;" {{!}} [[File:{{{map image}}}|175px|{{{name}}}]] }}
+
|-
+
{{#if: {{{flag image<includeonly>|</includeonly>}}} |
+
! colspan=2 style="background: white; text-align: center; font-size: 85%;" {{!}} [[File:{{{flag image}}}|175px|Flag of {{{name<includeonly>|</includeonly>}}}]] }}
+
|- class="note"
+
{{#if: {{{motto<includeonly>|</includeonly>}}} |
+
! colspan="2" style="text-align: center; font-size: 85%;" {{!}} ''{{{motto}}}'' }}
+
 
|- class="note"
 
|- class="note"
 
{{#if: {{{picture<includeonly>|</includeonly>}}} |
 
{{#if: {{{picture<includeonly>|</includeonly>}}} |
 
! colspan=2 style="background: white; text-align: center; font-size: 85%;" {{!}} [[File:{{{picture}}}|240px]]{{#if: {{{picture caption<includeonly>|</includeonly>}}}|<br />{{{picture caption<includeonly>|</includeonly>}}}}}}}
 
! colspan=2 style="background: white; text-align: center; font-size: 85%;" {{!}} [[File:{{{picture}}}|240px]]{{#if: {{{picture caption<includeonly>|</includeonly>}}}|<br />{{{picture caption<includeonly>|</includeonly>}}}}}}}
 
|-
 
|-
{{#ifeq: {{State-BI|{{namefix|{{{name}}} }} }}|Republic of Ireland|{{#if: {{{province<includeonly>|</includeonly>}}} |
+
{{#if: {{{database|{{PAGENAME}}|flag}}} | {{#vardefine:flag|{{database|{{PAGENAME}}|flag}}}}}}
 +
{{#if: {{{flag| }}} | {{#vardefine:flag|{{{flag}}}}}}}
 +
{{#if: {{#var:flag<includeonly>|</includeonly>}} |
 +
! colspan=2 style="background: white; text-align: center; font-size: 85%;" {{!}} [[File:{{#var:flag}}|150px|Flag of {{{name<includeonly>|</includeonly>}}}]] }}
 +
|-
 +
{{#if: {{#var:flag<includeonly>|</includeonly>}} |
 +
! colspan=2 style="background: white; text-align: center; font-size: 85%;" {{!}} [[Flag of {{{name<includeonly>|</includeonly>}}}|Flag]] }}
 +
|- class="note"
 +
{{#if: {{{database|{{PAGENAME}}|motto}}} | {{#vardefine:motto|{{database|{{PAGENAME}}|motto}}}}}}
 +
{{#if: {{{motto| }}} | {{#vardefine:motto|{{{motto}}}}}}}
 +
{{#if: {{#var:motto<includeonly>|</includeonly>}} |
 +
! colspan="2" style="text-align: center; font-size: 85%;" {{!}} ''{{#var:motto}}'' }}
 +
|-
 +
{{#if: {{{map image<includeonly>|</includeonly>}}} |
 +
! colspan=2 style="background: white; text-align: center; font-size: 85%;" {{!}} [[File:{{{map image}}}|170px|{{{name}}}]] }}
 +
|-
 +
!colspan="2" style="text-align: center;" {{!}} [http://wikishire.co.uk/map/#{{PAGENAMEE}}[Interactive map]]
 +
|-
 +
{{#ifeq: {{#var:state}}|Republic of Ireland|{{#if: {{{province<includeonly>|</includeonly>}}} |
 
! style="background: #D0F0C0;" {{!}} [[Provinces of Ireland|Province]]:
 
! style="background: #D0F0C0;" {{!}} [[Provinces of Ireland|Province]]:
 
{{!}} {{{province}}} }} }}
 
{{!}} {{{province}}} }} }}
 
|-
 
|-
{{#if: {{{area<includeonly>|</includeonly>}}} |
+
{{#if: {{{county of<includeonly>|</includeonly>}}} |
 +
! style="background: #D0F0C0;" {{!}} County of:
 +
{{!}} {{{county of}}} }}
 +
|-
 +
{{#if: {{{abbr<includeonly>|</includeonly>}}} |
 +
! style="background: #D0F0C0;" {{!}} Abbreviation:
 +
{{!}} {{{abbr}}} }}
 +
|-
 
! style="background: #D0F0C0;" {{!}} Area:
 
! style="background: #D0F0C0;" {{!}} Area:
{{!}} {{{area}}} }}
+
{{!}} {{#if: {{{area<includeonly>|</includeonly>}}} | {{{area}}} | {{#formatnum: {{database|{{PAGENAME}}|area}}|0||,}} square miles}}
 
|-
 
|-
{{#if: {{{population<includeonly>|</includeonly>}}} |
 
 
! style="background: #D0F0C0;" {{!}} Population:
 
! style="background: #D0F0C0;" {{!}} Population:
{{!}} {{{population}}} {{#if: {{{census year<includeonly>|</includeonly>}}}<small>&nbsp''({{{census year}}})''</small>}} }}
+
{{!}} {{#if: {{{population<includeonly>|</includeonly>}}} | {{{population}}} | {{#formatnum: {{database|{{PAGENAME}}|population}}|0||,}} }} {{#if: {{{census year<includeonly>|</includeonly>}}}<small>&nbsp''({{{census year}}})''</small>}}
 
|- class="note"
 
|- class="note"
 
{{#if: {{{county town<includeonly>|</includeonly>}}} |
 
{{#if: {{{county town<includeonly>|</includeonly>}}} |
! style="background: #D0F0C0;" {{!}} {{Countytown|{{namefix|{{{name}}} }} }}:
+
! style="background: #D0F0C0;" {{!}} {{Countytown|{{#var:shire}} }}:
 
{{!}} {{{county town}}} }}
 
{{!}} {{{county town}}} }}
 
|- class="note"
 
|- class="note"
Line 34: Line 49:
 
{{!}} {{{biggest town}}} }}
 
{{!}} {{{biggest town}}} }}
 
|-
 
|-
{{#if: {{{flower<includeonly>|</includeonly>}}} |
+
{{#ifeq: {{#var:state}}|United Kingdom|
 
! style="background: #D0F0C0;" {{!}} [[County flowers|County flower]]:
 
! style="background: #D0F0C0;" {{!}} [[County flowers|County flower]]:
{{!}} {{{flower}}} }}
+
{{!}} ''{{countyflower|{{#var:shire}}}}'' }}
|}<includeonly><!--{{DEFAULTSORT:{{sortname|{{namefix|{{{name}}} }} }}-->
+
|}<includeonly>
[[Category:{{namefix|{{{name}}} }}]]
+
{{Namesort|{{{name}}}}}
[[Category:{{#switch:{{State-BI|{{namefix|{{{name}}}}}
+
<!--{{DEFAULTSORT:{{sortname|{{#var:shire}} }} }}-->
 +
[[Category:{{#var:shire}}]]
 +
[[Category:{{#switch:{{#var:state}}
 
|United Kingdom=British counties
 
|United Kingdom=British counties
 
|Republic of Ireland=Counties of the Republic of Ireland
 
|Republic of Ireland=Counties of the Republic of Ireland
|}}]]</includeonly><noinclude>{{Infobox County/Doc}}</noinclude>
+
|}}]]</includeonly><noinclude>{{Infobox County/Doc}}<noinclude>[[Category:Infoboxes|County]]</noinclude>

Latest revision as of 16:34, 24 April 2018

{{{name}}}
error: name not on list
[[File:{{{picture}}}|240px]]
{{{picture caption}}}
[[File:{{{map image}}}|170px|{{{name}}}]]
[Interactive map]
County of: {{{county of}}}
Abbreviation: {{{abbr}}}
Area: {{{area}}}
Population: {{{population}}}
County seat: {{{county town}}}
Biggest town: {{{biggest town}}}

Usage

Blank template

{{Infobox county
| name=
| welsh=
| gaelic=
| irish=
| scots=
| cornish=
| map image=
| flag=
| motto=
| picture=
| picture caption
| province=
| area=
| population=
| county town=
| biggest town=
}}

Examples

Example 1: Huntingdonshire

Name
United Kingdom
Huntingdonshire
Flag of Huntingdonshire
Flag
St Ives The Quay 2.jpg
St Ives
Area: 359 square miles
County town: Huntingdon
Biggest town: St Neots
County flower: Water-violet [1]


Example 2: County Donegal

Name
Irish: Contae Dhún na nGall
Republic of Ireland
County Donegal
SlieveLeague ToneMapped.jpg
Slieve League cliffs
Province: Ulster
Area: 1,869 square miles
Population: 147,264
County seat: Lifford