Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Infobox Admin Subdivision

Template page

Usage

Renders an infobox for any level of administrative subdivision: country-level (admin 1, e.g. State/Province), sub-province (admin 2, e.g. District/Regency), sub-district (admin 3, e.g. Commune/Tehsil), or village level (admin 4).

The page's admin level is derived from which of country, province, admin_2, admin_3 are filled. Editor fills the parent chain up to but not including the page itself; the template handles level detection, category emission, SMW storage, and count queries.

Hierarchy and storage model

A subdivision page stores its parent chain plus its own Has admin level:

Page type Fill in Has admin level
Province / State (level 1) country 1
District (level 2) country, province 2
Commune / Tehsil (level 3) country, province, admin_2 3
Village (level 4) country, province, admin_2, admin_3 4

Count queries on the page filter by the property at this page's level:

Page is at level Count query filter
1 [[Has province::PAGENAME]]
2 [[Has admin 2::PAGENAME]]
3 [[Has admin 3::PAGENAME]]
4 [[Has admin 4::PAGENAME]]

Example: State (admin 1)

{{Infobox Admin Subdivision
|name = West Bengal
|local_name = পশ্চিমবঙ্গ
|subdivision_type = State
|image = West_Bengal_in_India.svg
|image_caption = Location of West Bengal in India
|show_map = yes
|coordinates = 22.57°N 88.37°E
|country = India
|subnational_region = East India
|predecessor = Bengal Province
|formation_date = 15 August 1947
|formation_note = by bifurcation
|capital = Kolkata
|largest_metro = Kolkata Metropolitan Region
|child_subdivisions_label = Districts
|child_subdivisions_note = 5 divisions
|area = 88,752 km² (34,267 sq mi)
|area_rank = 13th
|length = 320 km (200 mi)
|width = 623 km (387 mi)
|highest_elevation = 3,636 m (11,929 ft)
|highest_elevation_feature = Sandakphu
|lowest_elevation = 0 m (0 ft)
|lowest_elevation_feature = Bay of Bengal
|population = ~106,031,000
|population_year = 2026 est.
|population_rank = 4th
|population_trend = Increase
|population_density = 1,194/km² (3,090/sq mi)
|urban_percent = 31.87
|rural_percent = 68.13
|demonym = Bengali
|official_languages = Bengali, English
|additional_official_languages = Nepali, Urdu, Hindi, Odia, Santali, Punjabi, Kamtapuri, Rajbanshi, Kurmali, Kurukh, Telugu
|official_script = Bengali–Assamese script
}}

Example: District (admin 2)

{{Infobox Admin Subdivision
|name = Kirivong District
|local_name = ស្រុកកិរីវង់
|subdivision_type = District
|show_map = yes
|coordinates = 10.641, 104.844
|country = Cambodia
|province = Takeo Province
|capital = Doun Kaev
|child_subdivisions_label = Communes
|query_value = Kirivong
}}

The query_value override here handles the case where accessions store Has admin 2 = Kirivong (bare name) but the page lives at Kirivong District.

Example: Commune (admin 3)

{{Infobox Admin Subdivision
|name = Chros Okrouch Commune
|subdivision_type = Commune
|country = Cambodia
|province = Takeo Province
|admin_2 = Kirivong District
|query_value = Chros Okrouch
}}

Notes

  • The boundary polygon is read from Module:Boundaries via using the page name as key.
  • Categories are emitted by cascade: Admin Subdivisions always, plus the deepest of admin_3 / admin_2 / province / country. Do not add wikilinks manually.
  • All admin-level pages must set their parent chain correctly for count and cascade queries to work. Has admin level is set automatically.
  • Free-text fields (area, length, etc.) accept any display string; the SMW property stores the value as Text. Unit conversion is the editor's job — be consistent within a country.