Template:Infobox town: Difference between revisions

From Wikishire
Jump to navigation Jump to search
RB (talk | contribs)
mNo edit summary
mNo edit summary
 
(20 intermediate revisions by 2 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%; border: 1px solid lightgrey; padding: 4px; margin-left: 1em;"
{| 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:#D0F0C0; font-size: 100%"|<big class="fn org">{{#vardefine:type|town}}{{#if: {{{name| }}}|'''{{{name}}}'''|'''{{PAGENAME}}''' }}</big>{{#if: {{{welsh| }}}| <br>{{lang|cy|{{{welsh}}} }} }}{{#if: {{{gaelic| }}}| <br>{{lang|gd|{{{gaelic}}} }} }}{{#if: {{{irish| }}}| <br>{{lang|ga|{{{irish}}} }} }}{{#if: {{{greek| }}}| <br>{{lang|el|{{{greek}}} }} }}{{#if: {{{scots| }}}| <br>{{lang|sco|{{{scots}}} }} }}{{#if: {{{cornish| }}}| <br>{{lang|kw|{{{cornish}}} }} }}{{#if: {{{jerriais| }}}| <br>''Jèrriais:'' {{{jerriais}}} }}{{#if: {{{dgernesiais| }}}| <br>Dgèrnésiais: ''{{{dgernesiais}}}'' }}{{#if: {{{manx| }}}| <br>{{lang|gv|{{{manx}}} }} }}{{#if: {{{county| }}}|{{#vardefine:shire|{{namefix|{{{county}}}}}}}}}{{#if: {{{bailiwick| }}}|{{#vardefine:shire|{{namefix|{{{bailiwick}}}}}}}}}{{#if: {{{territory| }}}|{{#vardefine:shire|{{namefix|{{{territory}}}}}}}}}{{#if: {{{county 1| }}}|{{#vardefine:shire|{{namefix|{{{county 1}}}}}}}}}
|colspan=2 style="text-align: center; background:#D0F0C0; font-size: 100%"|<big class="fn org">{{#vardefine:type|town}}{{#if: {{{name| }}}|'''{{{name}}}'''|'''{{PAGENAME}}''' }}</big>{{#if: {{{welsh| }}}| <br>{{lang|cy|{{{welsh}}} }} }}{{#if: {{{gaelic| }}}| <br>{{lang|gd|{{{gaelic}}} }} }}{{#if: {{{irish| }}}| <br>{{lang|ga|{{{irish}}} }} }}{{#if: {{{greek| }}}| <br>{{lang|el|{{{greek}}} }} }}{{#if: {{{scots| }}}| <br>{{lang|sco|{{{scots}}} }} }}{{#if: {{{cornish| }}}| <br>{{lang|kw|{{{cornish}}} }} }}{{#if: {{{jerriais| }}}| <br>''Jèrriais:'' {{{jerriais}}} }}{{#if: {{{dgernesiais| }}}| <br>Dgèrnésiais: ''{{{dgernesiais}}}'' }}{{#if: {{{manx| }}}| <br>{{lang|gv|{{{manx}}} }} }}{{#if: {{{county| }}}|{{#vardefine:shire|{{namefix|{{{county}}}}}}}}}{{#if: {{{bailiwick| }}}|{{#vardefine:shire|{{namefix|{{{bailiwick}}}}}}}}}{{#if: {{{territory| }}}|{{#vardefine:shire|{{namefix|{{{territory}}}}}}}}}{{#if: {{{county 1| }}}|{{#vardefine:shire|{{namefix|{{{county 1}}}}}}}}}
|-
|-
! colspan=2 style="background: white; text-align: center; font-size: 100%;" {{!}} {{#switch:{{{name}}}|Bristol='''[[Gloucestershire]]''' and '''[[Somerset]]'''{{#vardefine:shire|Gloucestershire}}|Todmorden='''[[Lancashire]]''' and '''[[Yorkshire]]'''{{#vardefine:shire|Lancashire}}|Mossley='''[[Cheshire]]''', '''[[Lancashire]]''' and '''[[Yorkshire]]'''{{#vardefine:shire|Lancashire}}|{{#if:{{{county 1|}}}|'''[[{{namefix|{{{county 1}}}}}]]'''{{#if:{{{county 2|}}}|, '''[[{{namefix|{{{county 2}}}}}]]'''}}{{#if:{{{county 3|}}}|, '''[[{{namefix|{{{county 3}}}}}]]'''}}{{#if:{{{county 4|}}}|, '''[[{{namefix|{{{county 4}}}}}]]'''}}|'''[[{{#var:shire}}]]'''}}}}{{#ifeq:{{{county}}}|Yorkshire|{{#vardefine:riding|{{#if:{{{riding<includeonly>|</includeonly>}}}|{{#switch:{{namefix|{{{riding}}}}}
! colspan=2 style="background: white; text-align: center; font-size: 100%;" {{!}} {{#switch:{{{name}}}|Bristol='''[[Gloucestershire]]''' and '''[[Somerset]]'''{{#vardefine:shire|Gloucestershire}}|Todmorden='''[[Lancashire]]''' and '''[[Yorkshire]]'''{{#vardefine:shire|Lancashire}}|Mossley='''[[Cheshire]]''', '''[[Lancashire]]''' and '''[[Yorkshire]]'''{{#vardefine:shire|Lancashire}}|{{#if:{{{county 1|}}}|'''[[{{namefix|{{{county 1}}}}}]]'''{{#if:{{{county 2|}}}|, '''[[{{namefix|{{{county 2}}}}}]]'''}}{{#if:{{{county 3|}}}|, '''[[{{namefix|{{{county 3}}}}}]]'''}}{{#if:{{{county 4|}}}|{{#if:{{{county 5|}}}|,<br/>|, }}'''[[{{namefix|{{{county 4}}}}}]]'''}}{{#if:{{{county 5|}}}|, '''[[{{namefix|{{{county 5}}}}}]]'''}}|'''{{shead|{{#var:shire}}}}'''}}}}{{#ifeq:{{namefix|{{{county}}}}}|Yorkshire|{{#vardefine:riding|{{#if:{{{riding<includeonly>|</includeonly>}}}|{{#switch:{{namefix|{{{riding}}}}}
|East Riding of Yorkshire
|East Riding of Yorkshire
|East Riding
|East Riding
Line 15: Line 15:
|- 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}}}|250px]]{{#if: {{{picture caption<includeonly>|</includeonly>}}}|<br />{{{picture caption<includeonly>|</includeonly>}}}}}}}
|-
|-
| colspan="2" style="background: #D0F0C0; text-align: center;"|'''Location'''
| colspan="2" style="background: #D0F0C0; text-align: center;"|'''Location'''
Line 25: Line 25:
{{#if: {{{os grid ref<includeonly>|</includeonly>}}} |
{{#if: {{{os grid ref<includeonly>|</includeonly>}}} |
! style="background: #D0F0C0;" {{!}} Grid reference:
! style="background: #D0F0C0;" {{!}} Grid reference:
{{!}} {{getmap|{{{os grid ref}}}|{{{os grid ref}}}}} }}
{{!}} {{#if:{{{os grid ref|}}}|{{map|{{{os grid ref}}}}} }} }}
|-
|-
{{#if: {{{latitude<includeonly>|</includeonly>}}} |
{{#if: {{{latitude<includeonly>|</includeonly>}}} |
! style="background: #D0F0C0;" {{!}} Location:
! style="background: #D0F0C0;" {{!}} Location:
{{!}} {{wmap|{{{latitude}}}|{{{longitude}}}}}}}
{{!}} {{wmap|{{{latitude}}}|{{{longitude}}}|zoom=13}}}}
|-
|-
| colspan="2" style="background: #D0F0C0; text-align: center;"|'''Data'''
| colspan="2" style="background: #D0F0C0; text-align: center;"|'''Data'''
Line 35: Line 35:
{{#if: {{{population<includeonly>|</includeonly>}}} |
{{#if: {{{population<includeonly>|</includeonly>}}} |
! style="background: #D0F0C0;" {{!}} Population:
! style="background: #D0F0C0;" {{!}} Population:
{{!}} {{{population}}} {{#if: {{{census year|}}}|&nbsp;<small>''({{{census year}}})''</small>}} }}
{{!}} {{#number_format:{{#replace:{{{population}}}|,||}}|0||,}} {{#if: {{{census year|}}}|&nbsp;<small>''({{{census year}}})''</small>}} }}
|-
|-
{{#if: {{{post town<includeonly>|</includeonly>}}} |
{{#if: {{{post town<includeonly>|</includeonly>}}} |
Line 53: Line 53:
{{#if: {{{LG district<includeonly>|</includeonly>}}} |
{{#if: {{{LG district<includeonly>|</includeonly>}}} |
! style="background: #D0F0C0;" {{!}} Council:
! style="background: #D0F0C0;" {{!}} Council:
{{!}} ''{{{LG district}}}'' }}
{{!}} ''{{Display LG district|{{{LG district}}}}}'' }}
|-
|-
{{#if: {{{constituency<includeonly>|</includeonly>}}} |
{{#if: {{{constituency<includeonly>|</includeonly>}}} |
! style="background: #D0F0C0;" {{!}} Parliamentary<br>constituency:
! style="background: #D0F0C0;" {{!}} {{#ifeq:{{Part-BI|{{#var:shire}}}}|Republic of Ireland|Dáil|Parliamentary}}<br>constituency:
{{!}} {{{constituency}}} }}
{{!}} {{Display admin|{{{constituency}}}}} }}
|-
|-
{{#if: {{{website<includeonly>|</includeonly>}}} |
{{#if: {{{website<includeonly>|</includeonly>}}} |
! style="background: #D0F0C0;" {{!}} Website:
! style="background: #D0F0C0;" {{!}} Website:
{{!}} {{{website}}} }}
{{!}} {{{website}}} }}
|}<includeonly>
|}<includeonly>{{Saintsort}}
{{#switch:{{{name}}}|Bristol=[[Category:Towns and villages in Gloucestershire]] [[Category:Towns and villages in Somerset]]|Todmorden=[[Category:Towns and villages in Lancashire]] [[Category:Towns and villages in Yorkshire]] [[Category:Towns and villages in the West Riding of Yorkshire]]|Mossley=[[Category:Towns and villages in Cheshire]] [[Category:Towns and villages in Lancashire]] [[Category:Towns and villages in Yorkshire]] [[Category:Towns and villages in the West Riding of Yorkshire]]|York=[[Category:City of York]]|{{#if:{{{county|}}}|{{namecat|{{#var:shire}}|{{#var:riding}}}}}}
{{#switch:{{{name}}}|Bristol=[[Category:Towns and villages in Gloucestershire]] [[Category:Towns and villages in Somerset]]|Todmorden=[[Category:Towns and villages in Lancashire]] [[Category:Towns and villages in Yorkshire]] [[Category:Towns and villages in the West Riding of Yorkshire]]|Mossley=[[Category:Towns and villages in Cheshire]] [[Category:Towns and villages in Lancashire]] [[Category:Towns and villages in Yorkshire]] [[Category:Towns and villages in the West Riding of Yorkshire]]|York=[[Category:City of York]][[Category:Towns and villages in Yorkshire]]|{{#if:{{{county|}}}|{{namecat|{{#var:shire}}|{{#var:riding}}}}}}
{{#if:{{{territory|}}}|{{namecat|{{#var:shire}}}}}}
{{#if:{{{territory|}}}|{{namecat|{{#var:shire}}}}}}
{{#if:{{{bailiwick|}}}|{{namecat|{{#var:shire}}}}}}
{{#if:{{{bailiwick|}}}|{{namecat|{{#var:shire}}}}}}
Line 69: Line 69:
{{#if:{{{county 2|}}}|{{namecat|{{namefix|{{{county 2}}}}}|{{#var:riding}}}}}}
{{#if:{{{county 2|}}}|{{namecat|{{namefix|{{{county 2}}}}}|{{#var:riding}}}}}}
{{#if:{{{county 3|}}}|{{namecat|{{namefix|{{{county 3}}}}}|{{#var:riding}}}}}}
{{#if:{{{county 3|}}}|{{namecat|{{namefix|{{{county 3}}}}}|{{#var:riding}}}}}}
{{#if:{{{county 4|}}}|{{namecat|{{namefix|{{{county 4}}}}}|{{#var:riding}}}}}} }}{{#if:{{{townland|}}}|{{#switch:{{{townland}}}
{{#if:{{{county 4|}}}|{{namecat|{{namefix|{{{county 4}}}}}|{{#var:riding}}}}}}
{{#if:{{{county 5|}}}|{{namecat|{{namefix|{{{county 5}}}}}|{{#var:riding}}}}}} }}{{#if:{{{townland|}}}|{{#switch:{{{townland}}}
|yes
|yes
|aye
|aye
|y
|y
|{{{name}}}=[[Category:Townlands of {{#var:shire}}]]}}}}</includeonly><noinclude>{{Infobox town/doc}}[[Category:Infoboxes|Town]]</noinclude>
|{{{name}}}=[[Category:Townlands of {{#var:shire}}]]}}}}{{#if:{{{picture|}}}||[[Category:Town and village articles with no infobox picture]]}}</includeonly><noinclude>{{Infobox town/doc}}[[Category:Infoboxes|Town]]</noinclude>

Latest revision as of 16:51, 25 October 2024

Infobox town
[[]]
[[File:{{{picture}}}|250px]]
{{{picture caption}}}
Location
Island: [[{{{island}}}]]
Grid reference:
Location: {{{latitude}}} {{{longitude}}}
Data
Population: First argument to "number_format" must be a number.
Post town: {{{post town}}}
Postcode: {{{postcode}}}
Dialling code: {{{dialling code}}}
Local Government
Council: {{{LG district}}}
Parliamentary
constituency:
{{{constituency}}}
Website: {{{website}}}

Usage

Fields (blank template)

{{Infobox town
| name=
| welsh=
| gaelic=
| irish=
| scots=
| cornish=
| jerriais=
| dgernesiais=
| manx=
| county=
| riding=
| island=
| picture=
| picture caption=
| latitude=
| longitude=
| os grid ref=
| population=
| census year=
| post town=
| postcode=
| dialling code=
| LG district=
| constituency=
| website=
}}

Completing the fields

All of the fields above are optional apart from "county=" (which may be given as "territory=" or "bailiwick=" as appropriate. For general guidance see Guide to town and village articles. For specific key fields:

Name, county etc:

  • name - The name of the town as it will appear at the head of the box. It can be left out if the article has the same name but it is usually filled in.
  • cornish, gaelic, jerriais, welsh etc - the name in the appropriate language, if it is appropriate to the particular village to have another language's version, for example for a Gaelic-speaking village (or one which was Gaelic speaking in recent history).
  • county - The county in which the town lies. If it is on the boundary, the county it is mainly within. Alternatively the fields county 1 and county 2 can be employed where appropriate. For an overseas territory or crown dependency, the field territory or bailiwick may be used instead. They are functionally interchangeable.
  • island - Do not use this field if the island on which the town is found is Great Britain or Ireland nor if it is Anglesey or the Isle of Man as the "county" field deals with that.

Picture

  • picture - The file name of a picture on Commons, without the "File:" element.

Location fields

For these fields we recommend finding the place on Streetmap as it has a tag at the bottom "Click here to convert coordinates." which will give you the grid reference, latitude and longitude and nearest postcode all in the right form for use in the Infobox:

    • os grid ref - do not put spaces in the grid ref. It will create a link directly to Ordnance Survey
    • latitiude and longitude - use a decimal number (as Streetmap provide). The programme will convert it to degrees, minutes and seconds.
    • postcode - just the first half of a postcode should do.

Townland

A town or village in Ulster or the Republic of Ireland might also be a townland or share its name with a townland. For these, there is the optional "townland" field:

|townland=yes

- will categorise the place also in "Townlands of [county]".

Examples

Example 1: Abingdon

Abingdon
Berkshire

The River Thames at Abingdon
looking towards St. Helen's parish church
Location
Location: 51.667 N, -1.283 W
Grid reference: SU4997
Data
Population: 36,626
Post town: Abingdon
Postcode: OX14
Dialling code: 01235
Local Government
Council: Vale of White Horse
Parliamentary
constituency:
Oxford West and Abingdon
Website: Abingdon Town Council


Example 2: Youghal

Youghal
Irish: Eochaill
County Cork

The Clock Gate
Location
Location: 51.951671 N, -7.845612 W
Grid reference: X102781
Data
Population: 6393
Local Government
Website: www.youghal.ie