Template:Foos (dis)established in YYYY category header/doc

To make a category of the form "Foos established in YYYY" or "Foos disestablished in YYYY", where YYYY is a year (e.g. "872", "1976", or "2015"), and "Foos" is a type of entity, e.g. "Companies" or "Hospitals"

e.g.

Usage

edit

{{Foos (dis)established in YYYY category header}}

No parameters are needed, but some optional parameters may be supplied.

How it works

edit

The template parses the page title, and derives three items from it:

  1. The type of entity
  2. The action, i.e. either "established" or "disestablished"
  3. The year

So for example, if used on Category:Organizations established in 1837:

  1. type = "Organizations"
  2. action = "established"
  3. year = 1837

That page is categorised in three parent categories:

In some cases, this is sufficient. However, in other cases, the parent category should be a sub-category of Category:1837 establishments.

Foe example, Category:Transport companies established in 1926 should be a sub-category of Category:Companies established in 1926, and per WP:SUBCAT it should not be directly in Category:1926 establishments.

In cases such as these, extra parameters are needed.

Parameters for establishment type parent categories

edit

Up to three un-named parameters may be used to specify parent types

e.g. On Category:Transport companies established in 1926: {{Foos (dis)established in YYYY category header|Companies}}

The parameter "Companies" causes the page to be parented in Category:Companies established in 1926, instead of Category:1926 establishments

Redirects

edit

See also

edit