• Home
  • Random
  • Recent changes
  • Special pages
  • Settings
  • About MOASSpedia
  • Disclaimers
MOASSpedia
  • 216.73.216.154
  • Talk
  • Watchlist
  • Contributions
  • Log in

Template:CanadaByProvinceCatNav

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]
This template uses Lua:
  • Module:CanadaByProvinceCatNav
WarningThis template is used on approximately 9,600 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.

A category navigation template, designed to be used on any by-province-or-territory category for any of the 13 current Provinces and territories of Canada.

It creates a navbox with links to identically-named categories for other provinces and territories. For example, on Category:History of Quebec, it creates links to Category:History of Alberta, Category:History of British Columbia etc.

Non-existent categories are not linked. Instead, they are listed in grey, i.e. greyed out.

If there are no navigable links, the navbox will not be displayed, and the page will be categorised in Category:CanadaByProvinceCatNav with all grey links.

Contents

  • 1 Usage
  • 2 Examples
  • 3 Errors
  • 4 Tracking categories
  • 5 Development
  • 6 See also

Usage

{{CanadaByProvinceCatNav}}

No parameters are available.

Examples

See the template in use on e.g.

  • Category:Prince Edward Island
  • Category:Referendums in Quebec
  • Category:Death in Saskatchewan
  • Category:Landforms of Ontario
  • Category:Churches in Nunavut
  • Category:History of Manitoba
  • Category:Culture of Alberta
  • Category:Museums in Yukon
  • Category:Fjords of British Columbia
  • Category:People murdered in Nova Scotia
  • Category:Bus transport in New Brunswick
  • Category:Newfoundland and Labrador-related lists
  • Category:Writers from the Northwest Territories

Errors

If the template is used on page which is not a category, or on a category page whose title does not include a valid province or territory of Canada, then no navbox is built. an error message is displayed, and the page is categorised in Category:CanadaByProvinceCatNav on invalid category

Tracking categories

  • Category:CanadaByProvinceCatNav on invalid category (population: 0)
  • Category:CanadaByProvinceCatNav with no grey links (population: 0)
  • Category:CanadaByProvinceCatNav with fewer than 5 grey links (population: 0)
  • Category:CanadaByProvinceCatNav with over 5 grey links (population: 0)
  • Category:CanadaByProvinceCatNav with 10 or more grey links (population: 0)
  • Category:CanadaByProvinceCatNav with all grey links (population: 0)
TOTAL 0

Purge this page to update those counts.

Development

This template was adapted in September 2019 from {{AllIrelandByCountyCatNav}}, which began as a proposal at WP:WikiProject Ireland/CatNavProposal. The idea was refined through discussion at WT:WikiProject Ireland/CatNavProposal, and deployed in May 2018 after a 15-day trial on 150 pages.

See also

  • Template:AllIrelandByCountyCatNav
The above documentation is transcluded from Template:CanadaByProvinceCatNav/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://moasspedia.org/w/index.php?title=Template:CanadaByProvinceCatNav&oldid=7133"
Categories:
  • Lua-based templates
  • Canada category header templates
Last edited on 26 September 2019, at 08:04

MOASSpedia

Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • This page was last edited on 26 September 2019, at 08:04.
  • Content is available under Creative Commons Attribution-ShareAlike unless otherwise noted.
  • Privacy policy
  • About MOASSpedia
  • Disclaimers
  • Desktop