Template:LocationParamUsageCheck/doc

From MOASSpedia
< Template:LocationParamUsageCheck
Revision as of 11:48, 28 January 2019 by Wikipedia>BrownHairedGirl (Created page with '{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> <!-...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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