被永久保护的模板

Template:Infobox UK place

维基百科,自由的百科全书
跳到导航 跳到搜索
Infobox UK place
警察  
消防  
救護  
文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

本模板為英國有人居住地方條目提供Infobox,可顯示location map、圖像、captions及地方詳情,例如人口、行政及公共服務。

Basic syntax

英文維基百科的Examples提供了一些使用例子。

Full syntax

{{Infobox UK place
<!-- BASICS -->
| official_name                     = <!-- 預設是{{{PAGENAME}}} -->
| 中文名                            = <!-- 若不欲顯示{{{PAGENAME}}},可在此欄位輸入代替名稱 -->
| local_name                        = 
| country                           = <!-- 英格蘭 | 北愛爾蘭 | 威爾斯 | 蘇格蘭 - 請勿加[[內連]] (also produces EU constituency) -->
| crown_dependency                  = <!-- Isle of Man - NOT [[linked]] (this removes formal mentions of the UK) -->
| region                            = <!-- (僅用於英格蘭)不加內連 (also produces EU constituency) -->
| region1                           = <!-- for places split between regions -->
<!-- IMAGES -->
| static_image                      = <!-- now deprecated in favour of static_image_name (below); this is used for a static image (most commonly a skyline or landmark) -->
<!-- specified as [[File:filename.jpg|240px]] -->
| static_image_name                 = <!-- for a static image of the place, such as a skyline or defining local landmark該地點的指標照片,如天際線或著名地標 -->
<!-- specified as filename.jpg -->
| static_image_width                = <!-- allows control of the image width. Should be omitted in most cases (will default to 240) 可控制圖像寬度。在多數情況下可予忽略(初始值240)-->
| static_image_caption              = <!-- optional caption for static image (Use <small>Small text</small>) -->
| static_image_alt                  = <!-- for a description of the image per [[WP:ALT]] -->
| static_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) -->
<!-- specified as [[File:filename.jpg|240px]] -->
| static_image_2_name               = <!-- for a second static image, such as a town crest; specified as filename.jpg 第二個指標照片,以 圖檔名.jpg 註明-->
| static_image_2_width              = <!-- allows control of the image width. Should not exceed 240 可控制圖像寬度。應不超過240。-->
| static_image_2_caption=<!-- optional caption for static image 指標照片的選擇性抓取-->
| static_image_2_alt                = <!-- for a description of the image per [[WP:ALT]] -->
<!-- STATISTICS -->
| area_total_sq_mi                  = <!-- square mile data as a number - 自動提供平方英里數值 -->
| area_total_km2                    = <!-- sq km data as a number - 自動提供平方公里數值(如果此項留空) -->
| area_footnotes= <!-- to cite the values used in the area fields. Use the <ref> </ref> tags -->
| population                        = <!-- 輸入數字 -->
| population_ref                    = <!-- 附註:例如 <ref>2001年普查</ref> -->
<!-- a good place to check for these figures is http://neighbourhood.statistics.gov.uk/ -->
<!-- 任何非純數字的人口數值應放在此項,例如 "約500" 或 "少於500" -->
| population_density                = <!-- for /sq mi ...use convert template {{Pop density mi2 to km2|(enter value) |precision=1|abbr=yes}} -->
<!-- if pop density/km<sup>2</sup> is known use {{Pop density km2 to mi2|(enter value) |precision=1|abbr=yes}} -->
<!-- 注意:如果 population 有指明數值及 area_total_sq_mi 或 area_total_km2 二者其中之一有指明數值,則 population_density 會自動計算(如果手動編輯 population_density 則除外)。 -->
<!-- MAP & LOCATION -->
| os_grid_reference                 = 
| map_type                          = <!-- type of map (leave blank for default map, or set to nomap, UK or Greater Belfast to force a particular map) -->
| map_alt                           = <!-- alt text for map, for visually impaired and other readers who cannot see the image; see </nowiki>[[WP:ALT]]<nowiki> -->
| longitude                         = <!-- location of the place, puts a dot on the map -->
| latitude                          = <!-- location of the place, puts a dot on the map -->
| label_position                     = <!-- adjust position of label by dot – defaults to right -->        
| scale                             = <!-- optionally include a scale parameter in the coordinates link (default is city scale) -->
| post_town                         = <!-- e.g. UXBRIDGE - 自動顯示為大寫,請勿譯成中文 -->
| post_town1                        = <!--  位處多個郵鎮中的地點 -->
| post_town2                        = <!-- 位處多個郵鎮中的地點-->
| postcode_area                     = <!-- e.g. UB -->
| postcode_area1                    = <!--有多個郵區編號的地點 -->
| postcode_area2                    = <!-- 有多個郵區編號的地點 -->
| postcode_district                 = <!-- e.g. UB1, UB2 (this is displayed) -->
| postcode_district1                = <!-- 有多個郵區編號的地點 -->
| postcode_district2                = <!-- 有多個郵區編號的地點 -->
| dial_code                         = <!-- e.g. 020, 0161 or 01332 - NOT +44... -->
| dial_code1                        = <!-- for places with more than one dial code-->
| dial_code2                        = <!-- for places with more than one dial code-->
<!-- GOVERNANCE -->
| constituency_westminster          = <!-- 國會選區(使用連結,如[[奧爾德肖特 (英國國會選區)|奧爾德肖特]]) -->
| constituency_westminster1         = <!-- 如果多於一個選區,在此指明,如此類推。Use a link. -->
| constituency_westminster2         = <!-- for places in more than one constituency. Use a link. -->
| constituency_westminster3         = <!-- for places in more than one constituency. Use a link. -->
| civil_parish                      = <!-- for places within a parish. Use a link, e.g. [[Odd Rode]] -->
| civil_parish1                     = <!-- for places in more than one parish. Use a link. -->
<!-- DISTANCES -->
<!-- you can use the template {{convert|(enter data)|mi|precision=0}} to help convert miles to km automatically; both are displayed -->
| london_distance_mi                = <!-- for UK articles (outside of Greater London), distance to London as the crow flies -->
| london_distance_km                = 
| london_distance                   = 
| london_direction                   = 
| belfast_distance_mi               = <!-- 北愛爾蘭 articles only, distance to Belfast as the crow flies-->
| belfast_distance_km               = 
| belfast_distance                  = 
| belfast_direction                  = 
| cardiff_distance_mi               = <!-- 威爾斯 articles only, distance to Cardiff as the crow flies-->
| cardiff_distance_km               = 
| cardiff_distance                  = 
| cardiff_direction                  = 
| dublin_distance_mi               = <!-- distance to Dublin – may be relevant to NORTHERN IRISH articles as the crow flies-->
| dublin_distance_km               = 
| dublin_distance                  = 
| dublin_direction                  = 
| edinburgh_distance_mi             = <!-- 蘇格蘭 articles only, distance to Edinburgh as the crow flies-->
| edinburgh_distance_km             = 
| edinburgh_distance                = 
| edinburgh_direction                = 
| douglas_distance_mi               = <!-- MANX articles only, distance to Douglas as the crow flies-->
| douglas_distance_km               = 
| douglas_distance                  = 
| douglas_direction                  = 
| charingX_distance_mi              = <!-- 僅用於大倫敦以內的地方 as the crow flies-->
| charingX_distance_km              = 
| charingX_distance                 = 
| charingX_direction                 = 
<!-- SCOTLAND-SPECIFIC -->
| gaelic_name                       = 
| scots_name                        = 
| unitary_scotland                  = 
| unitary_scotland1                 = <!-- for places in more than one -->
| lieutenancy_scotland              = 
| lieutenancy_scotland1             = <!-- for places in more than one -->
| constituency_scottish_parliament  = 
| constituency_scottish_parliament1 = <!-- for places in more than one constituency -->
| constituency_scottish_parliament2 = <!-- for places in more than one constituency -->
<!-- WALES-SPECIFIC -->
| welsh_name                        = 
| community_wales                   = <!-- Use a link, e.g. [[Eglwyscummin]] -->
| unitary_wales                     = 
| unitary_wales1                    = <!-- for places in more than one -->
| lieutenancy_wales                 = 
| lieutenancy_wales1                = <!-- for places in more than one -->
| constituency_welsh_assembly       = 
| constituency_welsh_assembly1      = <!-- for places in more than one constituency -->
| constituency_welsh_assembly2      = <!-- for places in more than one constituency -->
<!-- NORTHERN IRELAND-SPECIFIC -->
| irish_name                        = 
| irish_grid_reference              = 
| unitary_northern_ireland          = 
| unitary_northern_ireland1         = <!-- for places in more than one -->
| unitary_northern_ireland2         = <!-- for places in more than one -->
| lieutenancy_northern_ireland      = 
| lieutenancy_northern_ireland1     = <!-- for places in more than one -->
| lieutenancy_northern_ireland2     = <!-- for places in more than one -->
| constituency_ni_assembly          = 
| constituency_ni_assembly1         = <!-- for places in more than one -->
<!-- ISLE OF MAN-SPECIFIC -->
| manx_name                         = 
| manx_parish                       = <!-- for places in the Isle of Man -->
| manx_shedding                     = <!-- for places in the Isle of Man, also generates emergency services -->
| constituency_manx_parliament      = <!-- for House of Keys constituency -->
<!-- ENGLAND-SPECIFIC -->
| metropolitan_borough              = 
| metropolitan_borough1             = <!-- for places in more than one -->
| metropolitan_county               = <!-- Use a link. e.g. [[Tyne and Wear]] -->
| metropolitan_county1              = <!-- for places in more than one -->
| shire_district                    = 
| shire_district1                   = <!-- for places in more than one -->
| shire_county                      = <!-- Use a link. e.g. [[Devon]] -->
| shire_county1                     = <!-- for places in more than one -->
| unitary_england                   = 
| unitary_england1                  = <!-- for places in more than one -->
| lieutenancy_england               = <!-- not required where shire or metropolitan is the same -->
| lieutenancy_england1              = <!-- for places in more than one -->
| london_borough                    = <!-- this should not be linked and simplified: e.g. Bromley NOT [[London Borough of Bromley]] -->
<!-- (also produces London Assembly constituency) -->
| london_borough1                   = <!-- for places in more than one borough (also produces London Assembly constituency) -->
| london_borough2                   = <!-- for places in more than one borough (also produces London Assembly constituency) -->
| london_borough3                   = <!-- special cases, does not produce London Assembly constituency) -->
| london_borough4                   = <!-- special cases, does not produce London Assembly constituency) -->
| cornish_name                      = 
<!-- ALL AREAS -->
| other_language_name               = <!-- any other alternative language name 任何其他語言名稱-->
| other_language                    = <!-- 任何其他語言名稱 -->
| language                          = <!-- any locally spoken languages 任何本地方言-->
| language1                         = <!-- 任何本地方言-->
| language2                         = <!-- 任何本地方言 -->
| website                           = <!-- Council website for place (specifically) -->
| hide_services                     = <!-- 如果全是紅連,可用 hide_services=yes 隱藏「警察/消防/救護」 -->
}}

參數

自動功能

功能 必填參數
基本功能
  • 中文名(預設為{{PAGENAME}})
  • country (?)
  • (只適用於英格蘭)region (?)
地圖
  • latitude
  • longitude
  • country
  • (只適用於英格蘭)region (= London) 或 metropolitan_county 或 shire_county 或 unitary_england (= Bristol, Isle of Wight, Southampton)
  • (只適用於蘇格蘭)unitary_scotland
緊急服務

可用 hide_services=yes 隱藏此項。

  • country
  • unitary_scotland (?) 或 unitary_england (?) 或 unitary_northern_ireland (?) 或 unitary_wales (?) 或 london_borough (?) 或 metropolitan_borough (?) 或 shire_district (?)
  • (只適用於英格蘭)shire_county (?) 或 metropolitan_county (?) 或 lieutenancy_england (?)
  • (只適用於英格蘭)region
  • Vale of White Horse and Hart districts only: ambulance_service (needs to be populated)
郵政
  • post_town (?)
  • postcode_area (?)
  • postcode_district
歐洲議會選區
  • country
  • (只適用於英格蘭)region
倫敦議會選區
  • london_borough
頁尾列表(此項已被停用)
  • country
  • london_borough 或 shire_county 或 metropolitan_county 或 lieutenancy_england 或 unitary_scotland 或 unitary_wales 或 lieutenancy_northern_ireland

常用功能

儘管沒必要自動化,以下內容一般需要添入
  • constituency_westminster (?
  • map_alt
  • os_grid_reference irish_grid_reference
  • dial_code (可以用 搜索電話區號)
  • Northern Ireland only: lieutenancy_northern_ireland (?
  • Wales only: lieutenancy_wales (?
  • Scotland only: lieutenancy_scotland (?

可選功能

可選功能 必填字段
Other language names gaelic_name scots_name welsh_name irish_name c或nish_name manx_name
Any other language name other_language other_language_name
  • local_name
Languages spoken language
Static image(s)
  • static_image (棄用)
  • static_image_name
  • static_image_width - 預設為240px,以適應地圖
  • static_image_caption
  • static_image_alt (參見WP:ALT
  • static_image_2 (棄用)
  • static_image_2_name
  • static_image_2_width - 預設為240px,以適應地圖
  • static_image_2_caption
  • static_image_2_alt
Map label position
  • label_position
  • 用以校準標籤的地圖上的位置點,可使用top, bottom, left, right, 或 none – 預設為right
Area
  • area_total_sq_mi
  • area_total_km2
  • area_footnotes
  • 僅需添一個數值,然後會自動轉化
Population figures
  • population – 必須是數字
  • population_density – 如果 area 及 population 有指明數值,可自動計算。
  • population_ref
  • 可以在neighbourhood.statistics.gov.uk尋找數據
  • F或 Census 2001 use | population_ref = <ref>2001年普查</ref>
Distance from capitals 用belfast, cardiff, douglas, dublin, edinburgh, 或 london代替<capital>
  • <capital>_distance_mi
  • <capital>_distance_km
    • 僅需添一個數值,然後會自動轉化
  • <capital>_distance
  • <capital_direction>
Distance within London 與上述的Distance from capitals相同。
Civil parish 或 Community
  • civil_parish 或 community_wales (?
Website link
  • website
    • 警告:過長的網址可能會導致摸板邊框產生問題
    • 如果過長,則使用簡化版,例如:[longurl.co.uk/home.html Short name]

跨過邊界的地方

跨過邊界的地方

很多地點橫跨數個郵鎮、選區或其他地區。當這種情況發生時,使用其自身所在區域:

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

有些區域劃分可能會令人產生混淆,如果必要可聯繫模版創立者。

常見錯誤

  • Location map出現「檢查到模板循環」錯誤。
原因:找不到合適的Location map,請檢查相關的Location map模板是否存在,行政區劃的參數是否遺漏或是否不配對「Template:Infobox UK place/local」內數據。
  • 「人口」出現「Expression error: ... must be numeric」
請把population的非數字內容放在population_ref參數內。

微格式

本模板產生的HTML記號包含了HCard 微格式,能夠讓電腦解析地點名稱和位置,具有可自動將文章分類至適當類別的功能。在HCard中有Geo微格式,能讓電腦分析经纬度資料,因此可在地圖上查詢,或下載至全球定位系统(GPS)裝置。關於微格式的更多使用資訊,請參閱維基百科的微格式專題

hCard 使用以下的 HTML class:

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

Geo由{{coord}}產生,並使用以下的HTML class:

  • geo
  • latitude
  • longtitude

请勿将这些class更名或删除。

當指定經緯度數值時,請避免太過詳細。

參見