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

Template:LocationParamUsageCheck

Template Discussion
  • Language
  • Watch
  • History
  • Edit
    • Page information
    • Permanent link
    • What links here
Template documentation[view] [edit] [history] [purge]

A monitoring template, to track use of by-year templates where:

  1. a location supplied as one or more parameters, and
  2. that parameter is different from the location specified in the title, or
  3. the title does not include a location

Contents

  • 1 Purpose
  • 2 Methodology
  • 3 Usage
  • 4 See also

Purpose

This template is intended as a temporary monitoring and diagnostic tool.

Most of the category-by-year header templates are designed to be used on pages where the location is part of the page title. In such cases, the year does not need to be supplied as a parameter, because it can be grabbed from the title using {{Title year}}.

If all uses of a template are on pages which do have a location in the title which matches the location parameters, then the location parameters are redundant, and the template can be rewritten to remove the parameters and instead parse the title.

This template will track the exceptions, if any.

Methodology

Usage

Outline
{{LocationParamUsageCheck
| pattern       = A Lua pattern which must match the whole string, with one pattern group which must match the location
| locationparam = <whatever combination one or more parameters denotes the location>
| templatename  = {{subst:PAGENAME}}
}}
Example

See also

  • Template:LocationParamUsageCheck category -- used for creating the tracking categories
The above documentation is transcluded from Template:LocationParamUsageCheck/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:LocationParamUsageCheck&oldid=23081"
Category:
  • LocationParamUsageCheck templates
Last edited on 28 January 2019, at 04:59

MOASSpedia

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