Documentation icon คู่มือการใช้งานแม่แบบ[ดู] [แก้] [ประวัติ] [ล้างแคช]


{{Infobox UK place}} is intended for use with articles about places (i.e. human settlements) in the United Kingdom. It has provision for a location map, images, captions, and detailed information about the place e.g. population, governance, and public services.

ไวยากรณ์พื้นฐาน แก้

Examples are available showing typical infoboxes together with the code for those examples. This code can be cut and pasted into new articles. The samples provided are:

Isle of Man
Northern Ireland
Scotland
Wales
England – these can have differing structures:
Greater London
City of London
Metropolitan county (Greater Manchester, Merseyside, Tyne and Wear, South Yorkshire, West Yorkshire, West Midlands)
Shire district in a shire county
...within a parish of the same name
Unitary district within a shire
Standalone unitary (Herefordshire, Rutland, Bristol, Isle of Wight)

ไวยากรณ์แบบเต็ม แก้

แม่แบบ:Infobox UK place/full syntax

พารามิเตอร์ แก้

For automated features แก้

Feature Required fields
Basic function official_name – defaults to {{{PAGENAME}}}
country (?)
England only: region (?)
Maps coordinates
country
England only: region (= London) OR metropolitan_county OR shire_county OR unitary_england (= Bristol, Isle of Wight, Southampton)
Scotland only: unitary_scotland

Note that by default, the coordinates are displayed to the right of the title, at the top of the page. This can cause an error if there is more than one set of coordinates in the article. To override the display in the title, use |display=inline inside of {{Coord}}.

If you wish to include an additional custom {{location map}} (typically for the local area), use |pushpin_map=location map name where location map name is the name of the location map.

Services country
unitary_scotland (?) OR unitary_england (?) OR unitary_northern_ireland (?) OR unitary_wales (?) OR london_borough (?) OR metropolitan_borough (?) OR shire_district (?)
England only: shire_county (?) OR metropolitan_county (?) OR lieutenancy_england (?)
England only: region
Vale of White Horse and Hart districts only: ambulance_service (needs to be populated)
Postal post_town (?)
postcode_area (?)
postcode_district
London Assembly london_borough
Footer lists country
london_borough OR shire_county OR metropolitan_county OR lieutenancy_england OR unitary_scotland OR unitary_wales OR lieutenancy_northern_ireland

Commonly used แก้

Although not required for any of the automation, the following fields should normally be filled in
  • constituency_westminster (?)
  • map_alt
  • os_grid_reference OR irish_grid_reference
  • dial_code (this may be of help finding the dialling code)
  • Northern Ireland only: lieutenancy_northern_ireland (?)
  • Wales only: lieutenancy_wales (?)
  • Scotland only: lieutenancy_scotland (?)

For optional features แก้

Optional feature Required fields
Other language names gaelic_name OR scots_name OR welsh_name OR irish_name OR cornish_name OR manx_name
Any other language name other_language AND other_language_name
local_name
Languages spoken language
Static image(s) static_image (deprecated)
static_image_name
static_image_width - defaults to 240px wide to match the maps.
static_image_caption
static_image_alt (see WP:ALT)
static_image_2 (deprecated)
static_image_2_name
static_image_2_width - defaults to 240px wide to match the maps.
static_image_2_caption
static_image_2_alt
Map label position label_position
Used to adjust position of label by dot on map– options are top, bottom, left, right, or none – defaults to right
Area area_total_sq_mi
area_total_km2
area_footnotes
Only one value needs to be entered as a number and it will be automatically formatted and converted to opposite system
Population figures population – must be a number
population_density – will be calculated automatically if area and population are present
population_ref
(A good place to find the population figures is at neighbourhood.statistics.gov.uk)
For Census 2001 use | population_ref = <ref>[[United Kingdom Census 2001|Census 2001]]</ref>
Distance from capitals Replace <capital> with belfast, cardiff, douglas, dublin, edinburgh, or london
<capital>_distance_mi
<capital>_distance_km
Only one value needs to be entered as a number and it will be automatically formatted and converted to opposite system
<capital>_distance
Used for footnotes or direction – see Boxing the compass
<capital_direction>
Enter direction to capital e.g. W, E, NE, SW – it will be linked to Boxing the compass
(Distances "as the crow flies" can be found from Genuki, or postcode.org.uk)
Distance within London Same as Distance from capitals above – replace <capital> with charingX
Civil parish or Community civil_parish OR community_wales (?) OR community_scotland (?)
iso_code ISO 3166 code; e.g. GB-BIR for Birmingham. If no specific code exists, the next highest-level code may be used, so again use GB-BIR for Bournville, which is part of Birmingham.
Website link website
WARNING: overlong urls may result in the sides of the infobox being pushed sideways.
If so, use a short link to the url e.g. [longurl.co.uk/home.html Short name]
embedded Embed another infobox in this one
pushpin_map Allows selection of another location map (e.g. Oxford (central)). This will combine with the default by radio button - (show within custom.name <default>, show default.name, show all)

Places split by boundaries แก้

Places split by boundaries

Many locations straddle the boundaries of post towns, constituencies, districts or regions. Where a place straddles these, they can be accommodated with its own field:

  • post_town AND post_town1 AND post_town2
  • civil_parish AND civil_parish1 AND civil_parish2
  • shire_district AND shire_district1 AND shire_district2
  • region AND region1
  • westminster_constituency AND westminster_constituency1 AND westminster_constituency2

There are slightly more "esoteric" extras to handle some tricky situations of division splits, which, if needed, can be explained by contacting one of the users involved in this template's construction.

ข้อมูลแม่แบบ แก้

ด้านล่างนี้คือข้อมูลแม่แบบ เอกสารกำกับสำหรับแม่แบบนี้ซึ่งถูกใช้งานโดยเครื่องมือแก้ไขแบบเห็นภาพและเครื่องมืออื่น ๆ

ข้อมูลแม่แบบสำหรับ Infobox UK place (ยังไม่มีการตรวจสอบ)

Intended for use with articles about places i.e. human settlements in the United Kingdom. It has provision for a location map, images, captions, and detailed information about the place e.g. population, governance, and public services.

พารามิเตอร์แม่แบบ[แก้ไขข้อมูลแม่แบบ]

This template prefers block formatting of parameters.

พารามิเตอร์คำอธิบายชนิดสถานะ
official nameofficial_name

defaults to {{{PAGENAME}}}

สตริงเลือกได้
local namelocal_name

สตริงเลือกได้
countrycountry

อังกฤษ, ไอร์แลนด์เหนือ, เวลส์, สกอตแลนด์ - โดยไม่ต้องใช้ [[ลิงก์]] และไม่ต้องใส่คำว่า 'ประเทศ'

สตริงเลือกได้
crown dependencycrown_dependency

Isle of Man - NOT [[linked]] (this removes formal mentions of the UK)

สตริงเลือกได้
regionregion

(England only) this should NOT be linked

สตริงเลือกได้
region1region1

for places split between regions

สตริงเลือกได้
static imagestatic_image

now deprecated in favour of static_image_name (below); this is used for a static image (most commonly a skyline or landmark)

สตริงเลือกได้
static image namestatic_image_name

for a static image of the place, such as a skyline or defining local landmark

สตริงเลือกได้
static image widthstatic_image_width

allows control of the image width. Should be omitted in most cases (will default to 240)

จำนวนเลือกได้
static image captionstatic_image_caption

optional caption for static image

สตริงเลือกได้
static image altstatic_image_alt

for a description of the image per [[WP:ALT]]

สตริงเลือกได้
static image 2static_image_2

now deprecated in favour of static_image_2_name (below); this is used for a second static image (for example a town crest)

สตริงเลือกได้
static image 2 namestatic_image_2_name

for a second static image, such as a town crest; specified as filename.jpg

สตริงเลือกได้
static image 2 widthstatic_image_2_width

allows control of the image width. Should not exceed 240

จำนวนเลือกได้
static image 2 captionstatic_image_2_caption

optional caption for static image

สตริงเลือกได้
static image 2 altstatic_image_2_alt

for a description of the image per [[WP:ALT]]

สตริงเลือกได้
area total sq miarea_total_sq_mi

square mile data as a number - will automatically provide conversion to km<sup>2</sup>

จำนวนเลือกได้
area total km2area_total_km2

sq km data as a number - will automatically provide conversion to square mile

จำนวนเลือกได้
area footnotesarea_footnotes

to cite the values used in the area fields. Use the <ref> </ref> tags

สตริงเลือกได้
populationpopulation

Enter just the number

จำนวนเลือกได้
population refpopulation_ref

include a reference: e.g. <ref>Census, 2001</ref>

สตริงเลือกได้
population densitypopulation_density

for /sq mi ...use convert template {{Pop density mi2 to km2

สตริงเลือกได้
statisticstatistic

ไม่มีคำอธิบาย

สตริงเลือกได้
statistic titlestatistic_title

ไม่มีคำอธิบาย

สตริงเลือกได้
statistic1statistic1

ไม่มีคำอธิบาย

สตริงเลือกได้
statistic title1statistic_title1

ไม่มีคำอธิบาย

สตริงเลือกได้
statistic2statistic2

ไม่มีคำอธิบาย

สตริงเลือกได้
statistic title2statistic_title2

ไม่มีคำอธิบาย

สตริงเลือกได้
population demonympopulation_demonym

สตริงเลือกได้
os grid referenceos_grid_reference

สตริงเลือกได้
map typemap_type

type of map (leave blank for default map, or set to nomap, UK or Greater Belfast to force a particular map)

สตริงเลือกได้
map altmap_alt

alt text for map, for visually impaired and other readers who cannot see the image; see [[WP:ALT]]

สตริงเลือกได้
label positionlabel_position

adjust position of label by dot – defaults to right

สตริงเลือกได้
Coordinatescoordinates

Latitude and longitude. Use {{Coord}}. See the documentation for {{Coord}} for more details on usage.

ตัวอย่าง
{{coord|41|50|15|N|87|40|55|W}}
แม่แบบเลือกได้
pushpin_mappushpin_map

The name of a regional location map (e.g. 'Oxford'). The coordinates information (from the coordinates parameter) position a pushpin coordinate marker and label on the map 'automatically'. Example see: Jericho, Oxford

สตริงเลือกได้
post townpost_town

e.g. UXBRIDGE - converted automatically to upper case

สตริงเลือกได้
post town1post_town1

for places in more than one post town

สตริงเลือกได้
post town2post_town2

for places in more than one post town

สตริงเลือกได้
postcode areapostcode_area

e.g. UB

สตริงเลือกได้
postcode area1postcode_area1

for places in more than one postcode area

สตริงเลือกได้
postcode area2postcode_area2

for places in more than one postcode area

สตริงเลือกได้
postcode districtpostcode_district

e.g. UB1, UB2 (this is displayed)

สตริงเลือกได้
postcode district1postcode_district1

for places in more than one postcode area

สตริงเลือกได้
postcode district2postcode_district2

for places in more than one postcode area

สตริงเลือกได้
dial codedial_code

e.g. 020, 0161 or 01332 - NOT +44...

สตริงเลือกได้
dial code1dial_code1

for places with more than one dial code

สตริงเลือกได้
dial code2dial_code2

for places with more than one dial code

สตริงเลือกได้
constituency westminsterconstituency_westminster

Use a link. e.g. [[Chiltern Hundreds]]

สตริงเลือกได้
constituency westminster1constituency_westminster1

for places in more than one constituency. Use a link.

สตริงเลือกได้
constituency westminster2constituency_westminster2

for places in more than one constituency. Use a link.

สตริงเลือกได้
constituency westminster3constituency_westminster3

for places in more than one constituency. Use a link.

สตริงเลือกได้
civil parishcivil_parish

for places within a parish. Use a link, e.g. [[Odd Rode]]

สตริงเลือกได้
civil parish1civil_parish1

for places in more than one parish. Use a link.

สตริงเลือกได้
civil parish2civil_parish2

for places in more than one parish. Use a link.

สตริงเลือกได้
london distance milondon_distance_mi

for UK articles (outside of Greater London), distance to London as the crow flies

จำนวนเลือกได้
london distance kmlondon_distance_km

จำนวนเลือกได้
london distancelondon_distance

จำนวนเลือกได้
london directionlondon_direction

สตริงเลือกได้
belfast distance mibelfast_distance_mi

NORTHERN IRISH articles only, distance to Belfast as the crow flies

จำนวนเลือกได้
belfast distance kmbelfast_distance_km

จำนวนเลือกได้
belfast distancebelfast_distance

จำนวนเลือกได้
belfast directionbelfast_direction

สตริงเลือกได้
cardiff distance micardiff_distance_mi

WELSH articles only, distance to Cardiff as the crow flies

จำนวนเลือกได้
cardiff distance kmcardiff_distance_km

จำนวนเลือกได้
cardiff distancecardiff_distance

จำนวนเลือกได้
cardiff directioncardiff_direction

สตริงเลือกได้
dublin distance midublin_distance_mi

distance to Dublin – may be relevant to NORTHERN IRISH articles as the crow flies

จำนวนเลือกได้
dublin distance kmdublin_distance_km

จำนวนเลือกได้
dublin distancedublin_distance

จำนวนเลือกได้
dublin directiondublin_direction

สตริงเลือกได้
edinburgh distance miedinburgh_distance_mi

SCOTTISH articles only, distance to Edinburgh as the crow flies

จำนวนเลือกได้
edinburgh distance kmedinburgh_distance_km

จำนวนเลือกได้
edinburgh distanceedinburgh_distance

จำนวนเลือกได้
edinburgh directionedinburgh_direction

สตริงเลือกได้
douglas distance midouglas_distance_mi

MANX articles only, distance to Douglas as the crow flies

จำนวนเลือกได้
douglas distance kmdouglas_distance_km

จำนวนเลือกได้
douglas distancedouglas_distance

จำนวนเลือกได้
douglas directiondouglas_direction

สตริงเลือกได้
charingX distance micharingX_distance_mi

for places WITHIN Greater London ONLY as the crow flies

จำนวนเลือกได้
charingX distance kmcharingX_distance_km

จำนวนเลือกได้
charingX distancecharingX_distance

จำนวนเลือกได้
charingX directioncharingX_direction

สตริงเลือกได้
gaelic namegaelic_name

สตริงเลือกได้
scots namescots_name

สตริงเลือกได้
community scotlandcommunity_scotland

Use a link, e.g. [[Old Aberdeen]]

สตริงเลือกได้
community scotland1community_scotland1

for places in more than one

สตริงเลือกได้
unitary scotlandunitary_scotland

สตริงเลือกได้
unitary scotland1unitary_scotland1

for places in more than one

สตริงเลือกได้
lieutenancy scotlandlieutenancy_scotland

สตริงเลือกได้
lieutenancy scotland1lieutenancy_scotland1

for places in more than one

สตริงเลือกได้
constituency scottish parliamentconstituency_scottish_parliament

สตริงเลือกได้
constituency scottish parliament1constituency_scottish_parliament1

for places in more than one constituency

สตริงเลือกได้
constituency scottish parliament2constituency_scottish_parliament2

for places in more than one constituency

สตริงเลือกได้
welsh namewelsh_name

สตริงเลือกได้
community walescommunity_wales

Use a link, e.g. [[Eglwyscummin]]

สตริงเลือกได้
community wales1community_wales1

for places in more than one

สตริงเลือกได้
unitary walesunitary_wales

สตริงเลือกได้
unitary wales1unitary_wales1

for places in more than one

สตริงเลือกได้
lieutenancy waleslieutenancy_wales

สตริงเลือกได้
lieutenancy wales1lieutenancy_wales1

for places in more than one

สตริงเลือกได้
constituency welsh assemblyconstituency_welsh_assembly

สตริงเลือกได้
constituency welsh assembly1constituency_welsh_assembly1

for places in more than one constituency

สตริงเลือกได้
constituency welsh assembly2constituency_welsh_assembly2

for places in more than one constituency

สตริงเลือกได้
irish nameirish_name

สตริงเลือกได้
irish grid referenceirish_grid_reference

สตริงเลือกได้
unitary northern irelandunitary_northern_ireland

สตริงเลือกได้
unitary northern ireland1unitary_northern_ireland1

for places in more than one

สตริงเลือกได้
unitary northern ireland2unitary_northern_ireland2

for places in more than one

สตริงเลือกได้
lieutenancy northern irelandlieutenancy_northern_ireland

สตริงเลือกได้
lieutenancy northern ireland1lieutenancy_northern_ireland1

for places in more than one

สตริงเลือกได้
lieutenancy northern ireland2lieutenancy_northern_ireland2

for places in more than one

สตริงเลือกได้
constituency ni assemblyconstituency_ni_assembly

สตริงเลือกได้
constituency ni assembly1constituency_ni_assembly1

for places in more than one

สตริงเลือกได้
manx namemanx_name

สตริงเลือกได้
manx parishmanx_parish

for places in the Isle of Man

สตริงเลือกได้
manx sheadingmanx_sheading

for places in the Isle of Man, also generates emergency services

สตริงเลือกได้
constituency manx parliamentconstituency_manx_parliament

for House of Keys constituency

สตริงเลือกได้
metropolitan boroughmetropolitan_borough

สตริงเลือกได้
metropolitan borough1metropolitan_borough1

for places in more than one

สตริงเลือกได้
metropolitan countymetropolitan_county

Use a link. e.g. [[Tyne and Wear]]

สตริงเลือกได้
metropolitan county1metropolitan_county1

for places in more than one

สตริงเลือกได้
shire districtshire_district

สตริงเลือกได้
shire district1shire_district1

for places in more than one

สตริงเลือกได้
shire countyshire_county

Use a link. e.g. [[Devon]]

สตริงเลือกได้
shire county1shire_county1

for places in more than one

สตริงเลือกได้
unitary englandunitary_england

สตริงเลือกได้
unitary england1unitary_england1

for places in more than one

สตริงเลือกได้
lieutenancy englandlieutenancy_england

not required where shire or metropolitan is the same

สตริงเลือกได้
lieutenancy england1lieutenancy_england1

for places in more than one

สตริงเลือกได้
london boroughlondon_borough

this should not be linked and simplified: e.g. Bromley NOT [[London Borough of Bromley]]

สตริงเลือกได้
london borough1london_borough1

for places in more than one borough (also produces London Assembly constituency)

สตริงเลือกได้
london borough2london_borough2

for places in more than one borough (also produces London Assembly constituency)

สตริงเลือกได้
london borough3london_borough3

special cases, does not produce London Assembly constituency)

สตริงเลือกได้
london borough4london_borough4

special cases, does not produce London Assembly constituency)

สตริงเลือกได้
cornish namecornish_name

สตริงเลือกได้
other language nameother_language_name

any other alternative language name

สตริงเลือกได้
other languageother_language

any other alternative language name

สตริงเลือกได้
languagelanguage

any locally spoken languages

สตริงเลือกได้
language1language1

any locally spoken languages

สตริงเลือกได้
language2language2

any locally spoken languages

สตริงเลือกได้
websitewebsite

Council website for place (specifically)

สตริงเลือกได้
hide serviceshide_services

Set to Yes to turn off Police/Fire/Ambulance

สตริงเลือกได้

Microformat แก้

button to indicate the presence of a Geo microformat
button to indicate the presence of a Geo microformat

The HTML mark up produced by this template includes an hCard microformat, which makes the place-name and location parsable by computers, either acting automatically to catalogue article across Wikipedia, or via a browser tool operated by a person, to (for example) add the subject to an address book. Within the hCard is a Geo microformat, which additionally makes the coordinates (latitude & longitude) parsable, so that they can be, say, looked up on a map, or downloaded to a GPS unit. For more information about the use of microformats on Wikipedia, please see the microformat project.

hCard uses HTML classes including:

  • "adr"
  • "county-name"
  • "fn"
  • "label"
  • "locality"
  • "nickname"
  • "note"
  • "org"
  • "vcard"

Geo is produced by calling {{coord}}, and uses HTML classes hCard uses HTML classes including:

  • "geo"
  • "latitude"
  • "longitude"

Please do not rename or remove these classes.


หมวดหมู่ติดตาม แก้