Template talk:Cat year nav

From Wikipedia, the free encyclopedia

Famicom style controller This article is within the scope of WikiProject Video games. For more information, visit the project page, where you can join the project and/or contribute to the discussion.

now implemented on all the CVG year categories. Dread Lord CyberSkull ✎☠ 05:50, 2005 August 28 (UTC)

Contents

[edit] Usage

{{cat year nav
| m = 
| c = 
| d = 
| y = 
| cat = 
| sortkey = 
| article = 
| in = 
}}

[edit] Example

{{cat year nav
| m = 2
| c = 0
| d = 0
| y = 5
| cat = computer and video games
| sortkey = 
| article = Computer and video games
| in = video gaming
}}

This category lists Computer and video games published in 2005.

← ⇐ 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 ⇒ →
See also: 2005 in video gaming

[[Category:2005|computer and video games]] [[Category:computer and video games by year]]


Now let's try with books!

{{cat year nav
| m = 2
| c = 0
| d = 0
| y = 5
| cat = books
| sortkey = 
| article = books
| in = literature
}}

This category lists books published in 2005.

2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
See also: 2005 in literature

[[Category:2005|books]] [[Category:books by year]]

[edit] To Do

  • Figure out something with the category links. Perhaps turn this into a meta-template? It's almost there now.

[edit] Discussion

The example above:

[[Category:2005|computer and video games]]

illustrates how this template is incorrectly using lower-case sortkeys. The above example would list the category under the section "c" (lower-case) instead of "C" (upper-case). The correct version would be:

[[Category:2005|Computer and video games]]

Apparently this is accomplished by using something like:

 {{cat year nav|
 | prev_dec = 1999
 | prev_year = 2004
 | current = 2005
 | next_year = 2006
 | next_dec = 2010
 | decade = 0
 | century = 20
 | cat = computer and video games
 | cat1 = Computer and video games
 | article = Computer and video games
 | in = video gaming
 }}

Note the addition of the "cat1" line. - dcljr (talk) 23:17, 19 December 2005 (UTC)

Ok, I will see about implementing a sortkey variable. Dread Lord CyberSkull ✎☠ 00:15, 20 December 2005 (UTC)
I'm not sure what you just changed, but what I meant was that the above solution already worked with no changes necessary to the template. Someone else fixed it before. Earlier today I went through all the pages that link to the template and changed them to use the correct capitalization. The change you just made to the template doesn't work (I just tested it with Category:1970 computer and video games), so I'm reverting your last edit. Let me know if you have any questions. - dcljr (talk) 05:35, 20 December 2005 (UTC)
cat1 is a bad variable name, so I changed it to one that actually makes sense. Variables should be named so that one understands what they store/do. Dread Lord CyberSkull ✎☠ 07:30, 20 December 2005 (UTC)

[edit] Overhaul

Ok, I've started to overhaul this into using ParserFunctions. Eventually the usage will look something like this:

{{cat year nav
| m = 
| c = 
| d = 
| y = 
| cat = 
| sortkey = 
| article = 
| in = 
| suffix = 
}}
  • millenia
  • century
  • decade
  • year

Dread Lord CyberSkull ✎☠ 13:52, 9 June 2006 (UTC)

Suffix should cover things like BC/BCE/AD/CE. Dread Lord CyberSkull ✎☠ 13:54, 9 June 2006 (UTC)
On second thought it won't. I'll create a separate template for BC/BCE, as the numbers go the other way. The suffix parameter will be for a transition to said numbering. Dread Lord CyberSkull ✎☠ 22:40, 9 June 2006 (UTC)

[edit] Change category:(year) to category:(year) works?

While doing my usual random walk through Wikipedia, I bumped into Category:1999 computer and video games and added it to Category:1999 works where it appears to belong. However, the Category:1999 categorization appears to be hard-coded into this template. I expect that not all year-categories with a corresponding CVG category have "works" subcategories yet, so changing the template itself would require a lot of additional work creating them. I'm game to do all the work myself but I figured I'd bring the topic up here first since it'll be a significant change to the category tree. Anyone object? Bryan 18:16, 2 July 2006 (UTC)

Oh, shoot, wait. This template appears to be more general than just computer and video games. Hm... not sure how to proceed now. Changing it to allow things to be put in places other than plain old category:year could be an even bigger task. Bryan 18:18, 2 July 2006 (UTC)

...or not. I see in the what links here that it's only used by CVG categories, and there's that Wikiproject banner above. I'm confused now, is this a CVG-specific template or a more generic template that just happens to only be used by CVG categories right now? Bryan 18:20, 2 July 2006 (UTC)

[edit] Changing template text

I'm changing "published in year" to "first published in year" as per this discussion. - X201 08:05, 6 July 2007 (UTC)