Կաղապար:YearParamUsageCheck/doc

Վիքիպեդիայից՝ ազատ հանրագիտարանից

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

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

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 year 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 year in the title which matches the year parameters, then the by-year parameters are redundant, and the template can be rewritten to remove them.

This template will track the exceptions, if any.

Usage[խմբագրել կոդը]

Outline
{{YearParamUsageCheck
| yearparam    = <whatever combination one or more parameters denotes the year>
| templatename = {{subst:PAGENAME}}
}}
Example

From Template:EstcatCanadaprovince

{{YearParamUsageCheck
| yearparam    = {{{1}}}{{{2}}}
| templatename = EstcatCanadaprovince
}}

See also[խմբագրել կոդը]