• Home
  • Random
  • Nearby
  • Log in
  • Settings
  • Donate
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Adjacent communities/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Adjacent communities
  • v
  • t
  • e
Places adjacent to Adjacent communities/sandbox

(enter location)

This is the template sandbox page for Template:Adjacent communities (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 27,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template uses Lua:
  • Module:Navbox (sandbox)
  • Module:Check for unknown parameters (sandbox)

Contents

  • 1 Usage
    • 1.1 How to use and not use this template
    • 1.2 Placement in article
    • 1.3 Examples
  • 2 Optional parameters
    • 2.1 Title
    • 2.2 Width (nesting/floating box)
    • 2.3 Expansion state
  • 3 Tracking category

Usage

edit
{{Adjacent communities
 | Centre    = 
 | North     = 
 | Northeast = 
 | East      = 
 | Southeast = 
 | South     = 
 | Southwest = 
 | West      = 
 | Northwest = 
}}

Or:

{{Adjacent communities
 | Centre = 
 | N  = 
 | NE = 
 | E  = 
 | SE = 
 | S  = 
 | SW = 
 | W  = 
 | NW = 
}}

This template provides for a convenient compass-based navigational aid for articles about communities. It allows you to display the communities surrounding the subject of your article.

While this template may be useful for cities, it certainly is redundant for continents, countries and other large geographical areas like states, provinces and islands. In the lead paragraphs of those types of articles, all surrounding countries and features are invariably stated and linked and there's usually a map in the infobox too.

The only required field is |Centre=; the template defaults to an "(enter location)" in the centre of the box message if nothing is entered here (see note below). The fields |Northwest= (|NW=), |North= (|N=), |Northeast= (|NE=), |West= (|W=), |East= (|E=), |Southwest= (|SW=), |South= (|S=), and |Southeast= (|SE=) are optional. They will be hidden when not used; when values are entered for the relevant parameters, the fields will automatically appear. (Normal Wiki markup can be used in the fields, such as links, colours, and bold/italics.)

The template is coded to handle the American spelling "center". It first looks for a value in |Centre=, then in |Center=; it defaults to the "(enter location)" message if both are left blank.

How to use and not use this template

edit

In order to ensure consistent usage, the following guidelines apply:

  • This template is for immediately adjacent places only.
  • Use same-level jurisdictions or equivalent in the directional fields as in the centre. For instance, when using this template for a municipality, show adjacent municipalities; when using it for unincorporated places, show adjacent unincorporated communities; etc.
  • When a municipality borders an international, provincial, or state boundary, try to use a municipality in that adjacent jurisdiction rather than the jurisdiction itself.
  • Geographical features such as oceans, rivers, lakes, and mountains should be in italics to differentiate them. But this should only be used sparingly for major defining features, in particular if there is no adjacent jurisdiction (e.g. sea, lake, etc.).
  • Avoid cluttering the template with too much detail; it is a navigational guide to provide links to adjacent locations, not a map.
  • Don't use flag icons for every link, see MOS:INFOBOXFLAG. They don't add value and are unnecessarily distracting.

Placement in article

edit
  • WP:LAYOUTNAV specifies that navboxes, including geography boxes such as this one, are placed after the "External links" section (i.e., immediately before categories; they should also be placed before stub templates).

Examples

edit

Here is an example for Ottawa (capital of Canada) demonstrating the guidelines above:

{{Adjacent communities
 | Centre    = Ottawa
 | North     = [[Pontiac, Quebec|Pontiac]], [[Gatineau]] ([[Quebec]])<br/>''[[Ottawa River]]''
 | Northeast = [[Lochaber-Partie-Ouest, Quebec|Lochaber-Partie-Ouest]] ([[Quebec]])<br/>''[[Ottawa River]]''
 | East      = [[Clarence-Rockland, Ontario|Clarence-Rockland]]
 | Southeast = [[Russell, Ontario|Russell]], [[The Nation, Ontario|The Nation]]
 | South     = [[North Grenville, Ontario|North Grenville]], [[North Dundas, Ontario|North Dundas]]
 | Southwest = [[Merrickville-Wolford, Ontario|Merrickville-Wolford]]
 | West      = [[Mississippi Mills, Ontario|Mississippi Mills]]<br/>[[Beckwith, Ontario|Beckwith]]<br/>[[Montague, Ontario|Montague]]
 | Northwest = [[Arnprior, Ontario|Arnprior]]
}}

produces:

  • v
  • t
  • e
Places adjacent to Adjacent communities/sandbox
Arnprior Pontiac, Gatineau (Quebec)
Ottawa River
Lochaber-Partie-Ouest (Quebec)
Ottawa River
Mississippi Mills
Beckwith
Montague
Ottawa
Clarence-Rockland
Merrickville-Wolford North Grenville, North Dundas Russell, The Nation


Not all directions necessarily need to be filled.

{{Adjacent communities
 | Centre = Knokke-Heist
 | N = ''[[North Sea]]''
 | E = [[Sluis]] ([[Netherlands|NL]]-[[Zeeland|ZE]])
 | S = [[Damme]]
 | W = [[Bruges]]
}}

produces:

  • v
  • t
  • e
Places adjacent to Adjacent communities/sandbox
North Sea
Bruges
Knokke-Heist
Sluis (NL-ZE)
Damme

Optional parameters

edit

Title

edit

The default title is "Places adjacent to {{PAGENAME}}". To override this, an optional title can be added; use |title=. This is particularly useful where 2 boxes are needed. For example, |title=Eastern part (includes the poblacion) produces:

  • v
  • t
  • e
Pakil – Eastern part (includes the poblacion)
Pangil
Laguna de Bay
Pakil
Real, Quezon
Paete
  • v
  • t
  • e
Pakil – Western part (includes barangays Banilan, Kabulusan, Casa Real, Casinsin, Dorado, Matikiw)
Pililla, Rizal Mabitac / Pangil
Jalajala, Rizal
Pakil
Laguna de Bay
Jalajala, Rizal

Width (nesting/floating box)

edit

By default, the width of the geographic location box is 100%, and is forced to clear below any left or right floating elements. To allow the box to position next to an infobox, image, or other floating element, enter |width=auto on the first line.

Example infobox
LabelData
LabelData
LabelData
  • v
  • t
  • e
Places adjacent to Adjacent communities/sandbox
Arnprior Pontiac, Gatineau (Quebec)
Ottawa River
Lochaber-Partie-Ouest (Quebec)
Ottawa River
Mississippi Mills
Beckwith
Montague
Ottawa
Clarence-Rockland
Merrickville-Wolford North Grenville, North Dundas Russell, The Nation

Expansion state

edit

Use |state=expanded to force the box to the expanded state, or |state=collapsed to hide it.

  • v
  • t
  • e
Places adjacent to Adjacent communities/sandbox
Northern neighbour
Western neighbour
Self
Eastern neighbour
Southern neighbour

Tracking category

edit
  • Category:Pages using adjacent communities with unknown parameters (0)
  • Category:Pages using adjacent communities with added directions (310)
The above documentation is transcluded from Template:Adjacent communities/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wiki.x.io/w/index.php?title=Template:Adjacent_communities/sandbox&oldid=1253657956"
Last edited on 27 October 2024, at 05:22

Languages

      This page is not available in other languages.

      Wikipedia
      • This page was last edited on 27 October 2024, at 05:22 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop