• Home
  • Random
  • Log in
  • Settings
  • About English Wikipedia @ Freddythechick
English Wikipedia @ Freddythechick

Template:Shieldlist/sandbox

  • Language
  • Watch
  • View source
< Template:Shieldlist
__EXPECTUNUSEDTEMPLATE__This is the template sandbox page for Template:Shieldlist (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:Jcon (sandbox)

{{Shieldlist}} creates a uniform appearance link suitable for use in list of highway tables in Ontario.

Usage

Usage is similar to {{jcon}} - Enter a county and a route number. The entry will link if the article exists, and a shield will be displayed to the left if it exists. In a list of highways or county roads, this template is placed within the cells in the "Route number" column.

For best effectiveness and for sorting purposes, the following is the best use:

{{ntsh|#}}{{anchor|#}}{{shieldlist|county or "hwy"|#}} (direction (if applicable))

The first number - for {{ntsh}} - allows the table to be sortable, and can be used in other cells to sort otherwise unsortable data. See List of numbered roads in Kawartha Lakes for a fully-developed example.

The second number - for {{anchor}} - does not suffer from this issue. This allows you to link from other articles to the specific table row the same way as you would to a section header.

Within {{shieldlist}} itself, the first parameter should be the county, region, district, township, or single-tier municipality, without the classifier. For example, the Regional Municipality of Durham should be simply "Durham". For provincial highways, use hwy. See Template:Jcon/doc#Supported types for a complete listing, as some shorthand variations are accepted (e.x. GS for Greater Sudbury). New types can be added to Module:Road data/strings/CAN/ON.

The second parameter is simply the route number, and should not have leading zeroes. In cases where road numbers are split into east and west (either by a geographic divide, or perhaps a one-way pairing), you should add this direction at the end within parenthesis.

Variant municipal route shields are supported for regional highways in the Regional Municipality of Durham and numbered "lines" in Perth County. In cases where such variant shields are desired, the first parameter - for {{shieldlist}} itself - should instead be "Durham Regional Highway" or "Perth County Line", respectively. Similar to {{jcon}}, the first parameter (the municipal name or "hwy") is converted to lowercase, and it is therefore case insensitive. Letters suffixed to route numbers should be capitalized as with {{jcon}} and {{jct}}. However, when "QEW" or "407ETR" is used as a route number in either {{shieldlist}} or {{jcon}}, the route number is case insensitive.

Example

<syntaxhighlight lang="wikitext">

Route Name(s) Western/Southern Terminus Eastern/Northern Terminus Length Communities
km mi
{{ntsh|001}}{{anchor|1}}{{shieldlist|Bruce|1}} Main Street King Street Queen Street 1}}{{convert|1|km|mi|disp=table|sortable=on}} Townville
</syntaxhighlight>
Route Name(s) Western/Southern Terminus Eastern/Northern Terminus Length Communities
km mi
Bruce County Road 1
Main Street King Street Queen Street 1 0.62 Townville
The above documentation is transcluded from Template:Shieldlist/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://enwiki.freddythechick.net/index.php?title=Template:Shieldlist/sandbox&oldid=13313230"
Last edited on 14 August 2024, at 21:16

Languages

      This page is not available in other languages.

      English Wikipedia @ Freddythechick
      • This page was last edited on 14 August 2024, at 21:16.
      • Content is available under Creative Commons Attribution-ShareAlike 4.0 unless otherwise noted.
      • About English Wikipedia @ Freddythechick
      • Desktop