Template talk:Year by category

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconYears Template‑class
WikiProject iconThis template is within the scope of WikiProject Years, a collaborative effort to improve the coverage of Years on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Please note that the template cannot be (currently) be used to index in more than one subcategory of a year, so for example to categorise Category:2006 elections in the United Kingdom, the subcat can be set to either 2006 elections, or 2006 in the United Kingdom. The other category would need to be added manually. Tim! 18:08, 21 December 2006 (UTC)[reply]

Unnecessarily confusing[edit]

This template should probably never have been given parameters beyond what is necessary to create the "timeline" of next/previous links. Doing so has made use of the template confusingly inconsistent and unpredictable. In particular:

  1. While the value of the "cat" parameter is the part of the category name following the year—including words like "in", if present—the values of "subcat" and "parent" must be full category names; and the value of "in", which otherwise is similar to "cat", must not include the word "in" because that's hard-coded into the template.
  2. The choice of the names "subcat" and "parent" is unfortunate, since those names seem antonymic, and yet mean the same thing here (both are parent categories into which the "current category" will be placed). The main "technical" difference between them is that only the "subcat"-generated category link honors the "sortkey", if provided; the "parent" category doesn't have any sortkey, meaning the sorting will be by year (since that's the first thing in the category name).
  3. As pointed out in the previous comment, only a limited number (originally 1, now 2) of parent categories are possible to specify with the template parameters; any others will have to be added "manually".

As for how this situation could be improved, the first step is obviously proper documentation, which I have just provided. Beyond that, I would recommend doing away with the whole "subcat"/"parent"/"sortkey" thing, since year-related categories almost always need thoughtful use of sortkeys to make the sorting consistent and logical (e.g., "2008 in Canadian music" should have the sortkey "Music" in the category "2008 in Canada", but "Canadian music" in "2008 in music", and no sortkey at all in "Canadian music by year"). Unfortunately, making such a change would probably require a bot, since this template is used on so many pages. - dcljr (talk) 03:08, 24 August 2011 (UTC)[reply]

Categories with tailored versions of the template[edit]

For the record, Category:1961 in Bechuanaland Protectorate to Category:1966 in Botswana have tailored versions of this template. – Fayenatic London 21:16, 18 August 2018 (UTC) [reply]

The above note is now obsolete, as user:BrownHairedGirl has implemented a revised template that utilises redirects. – Fayenatic London 11:03, 5 May 2021 (UTC)[reply]