Jump to content

Template:LocationParamUsageCheck/doc

From Wikipedia, the free encyclopedia

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[edit]

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[edit]

Usage[edit]

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[edit]