Template talk:Category series navigation/Archive 2

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1 Archive 2

joining to non-ended category?

Any way to get Category:Falkland Islands MLAs 2013–2017 to link to Category:Falkland Islands MLAs 2017–? I'm not sure why with regular elections that the second category doesn't have the 2021, but that's the current situation.Naraht (talk) 13:24, 8 November 2019 (UTC)

@Naraht: are these regularly scheduled elections? If so, then Category:Falkland Islands MLAs 2017– should probably be moved to Category:Falkland Islands MLAs 2017–2021. If there are some legit examples of open-ended categories, I can fit this into the module as a feature. As a workaround, though, you can create a {{Category redirect}} at Category:Falkland Islands MLAs 2017–2021 that points to Category:Falkland Islands MLAs 2017–, and it will be shown on the navbar.   ~ Tom.Reding (talkdgaf)  14:48, 8 November 2019 (UTC)
@Tom.Reding: Yes and no. From the article on the new Falkland Constitution.

The procedure for general elections, as well as the filling of vacant seats between general elections, is set out in section 32, with the dissolution of the Legislative Assembly being described in section 33. Under these sections, the Governor has the power to dissolve the Legislative Assembly at any time, but there must be a general election within 70 days of the dissolution and a general election must take place at least once every four years. If there is a vacant seat in the Legislative Assembly, under section 32(2), there must be a by-election to fill the empty seat within 70 days of the vacancy occurring (unless a dissolution is due within 126 days).

So the MLAs expect to serve 4 years, but no guarantee. Let me know if I should created the cat redirect.Naraht (talk) 14:55, 8 November 2019 (UTC)
@Naraht: currently, and per Template:Navseasoncats/doc#Searching behavior, "as long as the duration/range size remains constant, and no years/numbers are irregularly skipped", so if an irregular election happened, it would no longer be suitable for {{Navseasoncats}}. This is not ideal, of course, but it affects a relatively small # of categories, so I'll look into adding a variable-range search upon not finding the originally expected category based on the last pair's gap & range size. This might add a significant layer of complexity to the module, and/or drastically increase the expensive parser function count, neither of which I'd be willing to do, but I'll certainly entertain the idea for now. In the meantime, a redirect is the best solution.   ~ Tom.Reding (talkdgaf)  15:37, 8 November 2019 (UTC)
@Tom.Reding: Thanx!Naraht (talk) 15:38, 8 November 2019 (UTC)
@Tom.Reding: I'm using cat= for open-ended categories for Indian MLAs, but can't get Category:Mizoram MLAs 2018– (cat=Mizoram MLAs 2018–2023) to work in intervals of 5 years rather than 10. The preceding category 2013–2018 is missing, and it's apparently not sufficient for the template that 2003–2008 and 2008–2013 both exist. – Fayenatic London 08:18, 14 November 2019 (UTC)
I need to look into that. It may or may not be related. I'm a bit preoccupied irl currently, but this is definitely on my radar.   ~ Tom.Reding (talkdgaf)  13:23, 14 November 2019 (UTC)
For the record, I confirm that this is now working. – Fayenatic London 14:26, 7 February 2020 (UTC)

I looked into doing a variable-range search a few months ago, and it would be fairly complicated to add this functionality, so I'll be unable to do this in the short/medium term.   ~ Tom.Reding (talkdgaf)  16:44, 4 March 2020 (UTC)

2018-related

I tried using this template on Category:2018-related sports lists, but "Function find_var can't find the variable text". [1]

That category is now up for renaming, but the same weakness appears if it is tried on Category:2018-related timelines, where {{Cat pair}} is still in use instead. – Fayenatic London 09:52, 3 February 2020 (UTC)

I just tried this again on the second category, and it currently says:
Error! Function find_var can't find the variable text in category "2018-related timelines".***Navseasoncats failed to generate navbox***
Fayenatic London 15:50, 13 March 2020 (UTC)
 Done!   ~ Tom.Reding (talkdgaf)  17:01, 13 March 2020 (UTC)
Thanks again, Tom! You seem to have caught all such cases. Great work. – Fayenatic London 20:09, 13 March 2020 (UTC)

Skip-gaps when navbox isolated

I have used category header templates to install Navseasoncats (or {{Navseasoncats with centuries below decade}} or {{Navseasoncats with decades below year}}) on hundreds of category series.

In many of those series, thee is a pattern where some (usually recent) periods have closely clustered categories, but other periods (mostly less recent) have bigger and more frequent gaps. That make for a difficult choice between using or not using skip-gaps. On closely-spaced series, I prefer not to skip, but it's handy to do so on periods with longer spaces ... but and on/off binary choice doesn't help in series which combine both situations.

However, I think that a sensible compromise would be to skip gaps in a given direction when Navseasoncats is isolated in that direction. So if for example Category:Feasts by year had subcats for Cat:1063 feasts, Cat:1065 feasts, Cat:1073 feasts, Cat:1074 feasts, Cat:1076 feasts, Cat:1077 feasts etc, then Navseasoncats used on Cat:1073 feasts would skip the gap on the left between 1065 and 1073.

AFAICS, the Lua module is already identifying this isolation and using that code to populate Category:Navseasoncats isolated. So I hope that it won't be too big a job to use that info to enable gap-skipping on a case-by-case basis.

If there was an option to invoke {{Category series navigation|skip-gaps=if-isolated}} or {{Category series navigation|skip-gaps-if-isolated=yes}}, then it would help a lot. --BrownHairedGirl (talk) • (contribs) 03:34, 15 March 2020 (UTC)

Nested templates

Where navseasoncats includes links via category redirects, it does not build the links correctly if those redirects nest other templates.

I tried using {{title decade}} within category redirect. This builds a redirect OK, but navseasoncats does not use it correctly.

I tried

{{Category redirect|{{DECADE|{{title decade}}}} in the Captaincy General of Chile}}

at Category:1780s in Chile, and

{{Category redirect|{{title decade}}s in the Captaincy General of Chile}}

at Category:1790s in Chile, but the result at Category:1831 in Chile now includes:

[[:Category:{{DECADE|1780s]][[:Category:{{title decade|1790s]]

Fayenatic London 20:50, 26 March 2020 (UTC)

@Fayenatic, I agree it would be helpful for Navsesaonacts to parse {{title decade}} and {{title year}}, but for now the solution is to just use the year or decade in plain text. I will do an AWB run to implement that for these Chile redirects. --BrownHairedGirl (talk) • (contribs)@
@BrownHairedGirl: OK, a workaround will make it tidy for now. I only used the above on 4 pages, 1760s to 1790s, and have now fixed them. – Fayenatic London 21:13, 26 March 2020 (UTC)
OK, @Fayenatic. All done. --BrownHairedGirl (talk) • (contribs) 02:29, 27 March 2020 (UTC)

Fixed the alignment issues with two-row variants

This a just an FYI notification about a small fix.

Ever since I created {{Navseasoncats with decades below year}} almost 12 months ago, it has had a minor but irritating display glitch. The two rows are aligned to the centre, but if there are boxes floated the right (such as {{Portal}} and/or {{Commons category}}), then each box ends up calculating its centre differently ... so they go out of alignment, like in this simulation:

The year 1962 in Spain

{{Navseasoncats with centuries below decade}} is a separate and more sophisticated tool, built by @Tom.Reding using Lua, but it had the same glitch.

After a little fiddling, I fixed both templates today, but using a wee CSS kludge which I had developed for Module:IrelandByCountyCatNav. It uses the CSS max-width property to always leave space on the right for the boxes. The widest of those boxes that I have found is 23 em, so my kluge wraps both rows in a CSS block whose max width is always 25em less than the width of the available display section.

<div style="display:block !important; max-width: calc(100% - 25em);>"

Here are the diffs:

Yes, I may be the only who one was bothered by this. --BrownHairedGirl (talk) • (contribs) 15:30, 28 March 2020 (UTC)

Chapter 11 or same categories

Wrong action. See Category:Companies that filed for Chapter 11 bankruptcy in 2020. 91.124.169.249 (talk) 10:47, 30 March 2020 (UTC)

Good catch!
There could be several ways to tackle this:
  1. Set up a specific nav template for this Chapter 11 series.
  2.  Add an optional parameter to Navseasoncats to specify that the year is at the end of the page name.
  3.  Add an optional parameter to Navseasoncats to use the second (or third, etc?) number in the page name instead of the first in the page name. [Or to skip 1 (or more) numbers when looking for the year.]
  4. etc...
Aha, I just tried using the cat= parameter, and putting a non-breaking space in "Chapter 11", [2] so that {{title year}} skips over "11" as part of a word rather than a discrete number. That's a workaround for now. – Fayenatic London 20:35, 30 March 2020 (UTC)

Category:Playboy Playmates (1953–59)

What would be the fix for Category:Playboy Playmates (1953–59) (the next category is Category:Playboy Playmates (1960–1969))? --Gonnym (talk) 12:08, 1 April 2020 (UTC)

Just use cat= and enter the name as if it used the full decade.  DoneFayenatic London 08:07, 2 April 2020 (UTC)
Thanks! --Gonnym (talk) 08:11, 2 April 2020 (UTC)
Also had to add a redirect at Category:Playboy Playmates (1950–1959) to be used by the succeeding categories. – Fayenatic London 09:24, 2 April 2020 (UTC)
For the record, this set were renamed to category:1950s Playboy Playmates etc, which of course use the template without any special effort. – Fayenatic London 12:59, 5 April 2020 (UTC)

Category:Pre-1900 Pacific hurricane seasons

Is there a way to make the template work and connect Category:Pre-1900 Pacific hurricane seasons and Category:1900s Pacific hurricane seasons? --Gonnym (talk) 09:35, 7 April 2020 (UTC)

Linking of centre item on second row

Module:Navseasoncats was bolding and unlinking the centre item on the second row of navigation with {{Navseasoncats with decades below year}} and {{Navseasoncats with centuries below decade}}.

This appeared to have been an effort to emulate the default behavior of the Wikimedia software, which renders an attempted link to the current page as bolded, unliked text. However, the code was un-needed, because if the link is to the title of the current page, the then the Wikimedia software will handle unlinking and bolding it.

So in these two edits([3] and [4]) I have disabled the code which treated the centre item differently.

So far, the result seems to be fine, but please ping me if any problems are found. --BrownHairedGirl (talk) • (contribs) 19:55, 18 August 2020 (UTC)

Courtesy ping to @Tom.Reding, who built the module. --BrownHairedGirl (talk) • (contribs) 19:57, 18 August 2020 (UTC)

Irregular seasons

{{Navseasoncats}} cleverly handles seasons, but it cannot handle seasons of irregular length. The examples I came across are the subcats of Category:Legislators by term, but there are probably other cases.

To ease the pain of manually creating category navigation for such category series, I have created {{Irregular navseasoncats}}.

I have deployed it initially on the subcats of Category:Members of the Scottish Parliament by term and the subcats of Category:Members of the Jharkhand Legislative Assembly by term. --BrownHairedGirl (talk) • (contribs) 22:01, 28 April 2021 (UTC)

@BrownHairedGirl and Fayenatic london: I looked into trying to generalize searching for irregular season before (including skipped irregular seasons), which proved prohibitively tedious & time-consuming (esp while trying to keep all the existing nuanced functionality functional). BUT, cases like Category:Members of the Scottish Parliament by term can probably be incorporated much more easily, given that there is an "anchor" year shared between adjacent cats from which to base searches from (up to a term-length-limit of 10 years). Cases where there is a year-or-more gap between adjacent cats is when it gets overly complicated to generalize, and would probably be best handled by {{Irregular navseasoncats}}.
For irregular gaps even, I just realized, there is an easy work-around to use {{Navseasoncats}} right now — use a logically-numbered {{Category redirect}}, which {{Navseasoncats}} follows to the "illogical" category. Not an ideal solution, but "it's not stupid if it works". The logical cases with a common anchor-year won't need an intermediate redirect, after I'm done coding for them, only series with a year+ gap in them.   ~ Tom.Reding (talkdgaf)  11:33, 10 May 2021 (UTC)
Thanks, @Tom.Reding.
I looked into using category redirects as you suggest, but it seemed to me to break down on loner series with more variables, such as Category:Members of the Karnataka Legislative Assembly by term, which has several variants of term length and a name change. My experiments showed that it would need an ugly flurry of redirects, which would be hard to create and hard to maintain, 'cos only geeks like us would get the logic. That Karnataka example is what led me to create {{Irregular navseasoncats}}.
However, if simpler cases like Category:Members of the Scottish Parliament by term can be accommodated by some enhancement of plain {{Navseasoncats}}, that would be great. --BrownHairedGirl (talk) • (contribs) 11:42, 10 May 2021 (UTC)
 Done. This was indeed much easier than a non-0 gap implementation, but still required ~60 sandbox edits... (and I suspect some tweaking going forward as weird exceptions are found).   ~ Tom.Reding (talkdgaf)  12:06, 13 May 2021 (UTC)
@Tom.Reding: maybe I am a bit slow today, but I am not clear exactly what you have done. Please can you clarify for the benefit of the befuddled?
Thanks! --BrownHairedGirl (talk) • (contribs) 12:23, 13 May 2021 (UTC)
@BrownHairedGirl: I just updated the doc with Category:Wales AMs 2011–2016:
which has irregular term lengths of [4, 4, 4, 5, 5]. The previous version would have looked like:
  • 1996–2001
  • 2001–2006
  • 2006–2011
  • 2011–2016
  • 2016–2021
  • 2021–2026
  • 2026–2031
More examples @ Template:Navseasoncats/testcases2#Irregular term lengths with common year & Template:Navseasoncats/testcases#Overlapping seasons.   ~ Tom.Reding (talkdgaf)  13:08, 13 May 2021 (UTC)
Thanks, @Tom.Reding. Does that rely on redirects? --BrownHairedGirl (talk) • (contribs) 13:19, 13 May 2021 (UTC)
BrownHairedGirl, nope! That was just a work-around prior to the new version. A base-change #R will still be needed, though (which I have not tested in combination with an irregular term series).   ~ Tom.Reding (talkdgaf)  13:24, 13 May 2021 (UTC)
Thanks for that clarification, @Tom.Reding. That will be v useful in reducing the need for {{Irregular navseasoncats}}. --BrownHairedGirl (talk) • (contribs) 13:46, 13 May 2021 (UTC)
Great work, Tom! I found that the first Karnataka category using that name was not working, so I reverted just that one to {{Irregular navseasoncats}}. – Fayenatic London 07:30, 14 May 2021 (UTC)

Davis Cup Europe/Africa Zone

I see that these were fixed by inserting a parameter |cat= Davis Cup Europe/Africa Zone
The same fix method was required in all the subcats of Category:Billie Jean King Cup Europe/Africa Zone and Category:Billie Jean King Cup Asia/Oceania Zone.
It would be nice if this could be fixed without requiring such manual parameters. Meanwhile, may I suggest adding a tracking category to test for where the category fails to link to the page itself? The examples above would have been in Category:Navseasoncats isolated before, but that currently contains 5,000 categories, most of which begin with years, so they would not have stood out as solvable. – Fayenatic London 11:36, 26 March 2021 (UTC)
 Done   ~ Tom.Reding (talkdgaf)  12:01, 13 May 2021 (UTC)
Thank you, Tom! Here's another odd one: the template doesn't work on Category:30 Rock (season 3) episodes, but works fine on its siblings. I can't trace the problem. – Fayenatic London 21:21, 13 May 2021 (UTC)
@Fayenatic london: I think it's confusing the '3' in 'season 3' with the one in '30'. If you want to see something fun, and what the module is doing before spitting out the nav, preview {{Category series navigation|cat=30 Rock (season 3) episodes|list-all-links=yes}} before I fix it :)   ~ Tom.Reding (talkdgaf)  22:36, 13 May 2021 (UTC)
 Done   ~ Tom.Reding (talkdgaf)  15:56, 14 May 2021 (UTC)
Aha! Claro que si. I tried the nbsp trick that works with Chapter 11 prefixes, but that did not seem to cut it this time. – Fayenatic London 22:40, 13 May 2021 (UTC)
 Done. Though no longer necessary, I think your hack/work-around is very clever, and should stay in the /doc, in case there's use for it elsewhere in the future.   ~ Tom.Reding (talkdgaf)  15:56, 14 May 2021 (UTC)
Thanks again for yet another fix! I'd forgotten that it was me who originally came up with that hack. I don't recall now where I got the idea. – Fayenatic London 18:32, 14 May 2021 (UTC)

When to also use Template:Category pair

The documentation ("General" note) currently says: for large, permanent gaps between successive categories… use {{Category pair}} in addition.

An anon editor added {{Cat pair}} on a large number of pages in Category:Navseasoncats isolated where there are currently large gaps between categories, but I don't think this is what was intended. IMHO the resulting links looked bizarre and unnecessary; navigating by parent categories is better, especially where decades are shown below years. E.g. [5] (already obsolete) or [6]. In the latter case the gaps are quite likely to be longstanding, but I think "permanent" refers to a state of certainty, e.g. a gap between parliamentary terms when there was no parliament.

I reverted some such additions yesterday before I noted that sentence in the documentation, so can we confirm a consensus on this point before I remove more? – Fayenatic London 13:40, 14 May 2021 (UTC)

@Fayenatic london: yes, some form of discouragement, or slightly stricter wording I think are appropriate given that.   ~ Tom.Reding (talkdgaf)  15:31, 14 May 2021 (UTC)
Thank you, I have documented that, and reverted more edits where Category pair was added inappropriately. – Fayenatic London 20:57, 18 July 2021 (UTC)

Hanging dashes

This section can probably be deleted when solved, but I'm puzzled that Special:WhatLinksHere/Category:Members_of_the_Scottish_Parliament_2021– is not empty after renaming and deleting that category with the missing year. The same applies to N Ireland but not Greece or Ghana out of this set of 4. – Fayenatic London 21:02, 18 July 2021 (UTC)

Help:What links here#Overview says: The parser function #ifexist: causes a listing in "What links here" among the normal links even though no link is produced.
Category:Greek MPs 2015–2019 and Category:Ghanaian MPs 2017–2021 don't use {{Navseasoncats}}. PrimeHunter (talk) 22:41, 18 July 2021 (UTC)
Thanks, that explains it. @Tom.Reding: the hanging dash format will shortly be obsolete, after this and this. You might then want to simplify the modules by removing support for that format. – Fayenatic London 12:22, 20 July 2021 (UTC)
It appears that some numberless hanging dashes will be replaced by "–present".[7] I have documented this at Category_talk:Legislators_by_term#Naming_format_for_current_term. – Fayenatic London 09:00, 22 July 2021 (UTC)

Adding decade-below-year & century-below-decade functionality by default

Per discussion @ Module talk:Navseasoncats with year navigation#What's the plan here?, adding {{Navseasoncats with decades below year}} & {{Navseasoncats with centuries below decade}} functionality to the main template by default seems like the smartest course of action. Not only does it obviate the need for those modules, it magnifies their functionality to potentially many more transclusions, with no additional user input. My only concern right now, that I have not yet investigated, is to make sure that all subordinate templates, like those in {{Creative works chronology category header templates}}, won't have to be modified. I'll leave this here for a bit, as it will take some time & testing to incorporate anyway.   ~ Tom.Reding (talkdgaf)  11:33, 20 July 2021 (UTC)

@Tom.Reding: I created or rebuilt nearly all of the templates in {{Creative works chronology category header templates}}, and most of the other category header templates which use the {{Navseasoncats}}.
I can't see any circumstances in which any of them could have any problems with the secnd row if generated.
The one issue which might potentially have been troublesome was a glitch where the two rows didn't always align properly if there are boxes on the right. However I added some CSS trickery which fixed it: [8]. --BrownHairedGirl (talk) • (contribs) 19:03, 20 July 2021 (UTC)
 Done (*fingers crossed*)   ~ Tom.Reding (talkdgaf)  17:30, 8 August 2021 (UTC)
thank you,@Tom.Reding. That's great work.
Any chance of some diffs so we can see how it has been implemented? --BrownHairedGirl (talk) • (contribs) 19:52, 8 August 2021 (UTC)
Seems good to me, well done again! I have not found any problems with it so far. – Fayenatic London 13:28, 9 August 2021 (UTC)
@BrownHairedGirl and Fayenatic london: actually, I had to rv the update when I noticed duplicate double navs (i.e. 4 navs) showing up. In addition to Module:Navseasoncats, I need to simultaneously & correctly update all 3 modules/templates mentioned above that are, I think, all of the entry points into Navseasoncats.   ~ Tom.Reding (talkdgaf)  14:43, 9 August 2021 (UTC)
 Done now. That took a few more steps than I was expecting.   ~ Tom.Reding (talkdgaf)  23:13, 20 August 2021 (UTC)

Update: MOS:TOPRESENT compliance & 0-length terms

Per a recent discussion/realization, MOS:TOPRESENT is now tracked for compliance (Category:Navseasoncats range ends (present) (0)) & violation (Category:Navseasoncats range ends (blank, MOS) (0)), as well as 0-length ranges now being acceptable within a hyphenated series (Category:Navseasoncats range irregular, 0-length (0)).   ~ Tom.Reding (talkdgaf)  13:31, 29 August 2021 (UTC)

Numbers hyphenated with words

Should navseasoncats be able to work on the sub-cats of Category:Engines by cylinder layout, e.g. Nine-cylinder engines, 10-cylinder engines ?

@Fayenatic london: I can add that functionality, but why is there an unnecessary transition from words to numbers?   ~ Tom.Reding (talkdgaf)  12:21, 22 September 2021 (UTC)
The ones >9 were renamed at Wikipedia:Categories for discussion/Log/2021 August 10#Category:42-cylinder engines citing WP:MOSNUMERAL. I suggest you don't worry about spanning that transition, unless it's easier than I think!
There are a few other sets using numbers with hyphens, e.g. Category:Polytopes, Category:Prime limits, Category:Long-distance running competitions, Category:Tournament bracket templates, but I have not found any others that currently go from 9 to 10 per that MOS page. I acknowledge that not all of these examples would necessarily benefit from navseasoncats. – Fayenatic London 12:57, 22 September 2021 (UTC)
@Fayenatic london: looking at MOS:NUMERAL, it's not that clear about this. Should we also be changing all Category:First Dynasty of EgyptCategory:Thirty-first Dynasty of Egypt that are > 9 to numerals? I don't think so.
Yes, MOS:NUMERAL says:
  • "Integers from zero to nine are spelled out in words", and
  • "Integers greater than nine expressible in one or two words may be expressed either in numerals or in words",
  • but it also says "Avoid beginning a sentence with a figure".
Therefore, if we really want to obey MOS:NUMERAL, we should be using Category:Forty two-cylinder engines, and that CfD should be reversed.
The caveat, and the key point, is that all these bullets are prefaced with the heading "Generally, in article text". So, for cat names, to me, this all boils down to "use your best judgement", which, to me, means consistency. We don't switch from word to numeral for Thirty-first Dynasty of Egypt, nor Eleventh convocation members of the Verkhovna Rada of the Ukrainian Soviet Socialist Republic, so why for "X-cylinder engines"?
Since everyone in the CfD agreed on numbers, I think we should extend that down to Single-cylinder engines. What do you think? I'll CfD the 1-9-cylinder cats in a little while, and await the outcome before making any changes re: switching to Module:Navseasoncats.   ~ Tom.Reding (talkdgaf)  12:02, 26 September 2021 (UTC)
Fine by me, although single-cylinder sounds more natural than 1-cylinder. I was not clear in what I was requesting – spanning the transition is a lot to ask for. My point was that navseasoncats does not work on numbers hyphenated to words, e.g.
Error! Function find_var can't find the variable text in category "10-cylinder engines".***Navseasoncats failed to generate navbox***
This happens if you try it either on nine-cylinder or 10-cylinder.– Fayenatic London 14:06, 26 September 2021 (UTC)
CFD @ Wikipedia:Categories for discussion/Log/2021 October 3#Category:Nine-cylinder engines.   ~ Tom.Reding (talkdgaf)  13:38, 3 October 2021 (UTC)
Also, Nine-cylinder engines & 10-cylinder engines now correctly display in the sandbox:
Pending bug fix below & the CFD outcome above to make live.   ~ Tom.Reding (talkdgaf)  14:17, 3 October 2021 (UTC)
 Done & live. The CFD isn't going my way, so I'll make redirects in both directions instead of coding for this vary rare exception.   ~ Tom.Reding (talkdgaf)  13:42, 4 October 2021 (UTC)

Thank you, Tom.Reding! Your next mission, should you decide to accept it, is to make it work on the sub-cats of Category:Straight engines, which have the number after a word, e.g. Category:Straight-six engines. – Fayenatic London 11:00, 6 October 2021 (UTC)

@Fayenatic london: perhaps - if I can easily incorporate that w/o breaking anything else. I'll add that to 'making |skip-gaps=yes work on Nine-cylinder engines'.   ~ Tom.Reding (talkdgaf)  12:11, 6 October 2021 (UTC)
 Done - |skip-gaps=yes now works on Nine-cylinder engines via |cat=9-cylinder engines.
 Done - sub-cats of Category:Straight engines now work natively, with |cat= + #R only needed for Straight-twin engines.
If more of these English-number cats show up, then I'll invest more time into fully automating |skip-gaps=yes, but right now they are very much the exception and not the rule.   ~ Tom.Reding (talkdgaf)  02:18, 16 October 2021 (UTC)
Great work, Tom, and well done for the others in the section below! There is also the series under Category:V engines which are beyond the scope because they are not hyphenated. I have in mind to set up a workaround using a full set of redirects from hyphenated forms. – Fayenatic London 17:16, 16 October 2021 (UTC)
 Done   ~ Tom.Reding (talkdgaf)  17:55, 16 October 2021 (UTC)
Astounding. Definitely time to award you a barnstar! – Fayenatic London 19:58, 16 October 2021 (UTC)

An error at the switch from years to seasons

At Category:2020–21 in Scottish women's football, 2021–22 appears twice instead of 2022–23. – Fayenatic London 11:39, 22 September 2021 (UTC)

@Tom.Reding: Here's an incomplete one, missing the season 2008–09 and those between 2009 and 2014 at Category:2015–16 W-League (Australia). The sequence in Category:A-League Women seasons is so irregular that you needn't beat yourself up if a standard template can't capture it all. – Fayenatic London 08:04, 3 October 2021 (UTC)

@Fayenatic london: per A-League Women seasons, the only missing cat link is 2008–09 W-League (Australia). The others between 2009 & 2014 do not contain "(Australia)", and so are correctly ignored. As a temporary work-around, 2008–09 W-League (Australia) can be found by creating a redirect at 2008 W-League (Australia), but this is a bug I will try to fix.   ~ Tom.Reding (talkdgaf)  12:40, 3 October 2021 (UTC)
@Tom.Reding: good point, thank you. W-League is a disambiguation page, but only the Australian league and Category:USL W-League have categories, the latter of which are consistently prefixed with USL. Nevertheless user:Soccer-holic found it necessary to disambiguate the 2009 article,[9] which was followed in the category name. 2014 and subsequent categories use the disambiguator even though the articles for the subsequent Australian seasons do not, e.g. 2010–11 W-League. I suggest that Category:2010–11 W-League to 2013–14 should be renamed to include the disambiguator. I think the 9:4 ratio using "(Australia)" would be sufficient for C2C and that this would override C2D. – Fayenatic London 20:41, 3 October 2021 (UTC)
 Done   ~ Tom.Reding (talkdgaf)  13:43, 4 October 2021 (UTC)
Cheers! I have speedily renamed the seasons 2010–11 to 2013–14 to include "(Australia)", but they still do not appear as links from the single years e.g.
Is it necessary to set up redirects from years to seasons, like the one at Category:2015 W-League (Australia), which is already utilised in the example just given?
This one also omits the seasons that I have just renamed:
Fayenatic London 20:48, 9 October 2021 (UTC)
@Fayenatic london: yes (for now), but please do not! This is a great testcase scenario.
It seems all 4 possible combinations of series exist in the wild, and nsc handles most of them well (only 1 #R is needed). In rough order of decreasing prevalence:
  1. <hyph> <hyph> <year> <hyph> <hyph> - nsc find everything, no matter the starting point.
  2. <year> <year> <hyph> <year> <year> - nsc finds <year> when starting on <hyph>, but when starting on <year>, it needs an #R from <hyph> to <year> (similar to a base-change scenario).
  3. <year> <year> <year> <hyph> <hyph> <hyph> - nsc finds all <year> when starting on <year>, but needs an #R from the first <hyph> to <year> (similar to a base-change scenario). When starting on <hyph>, nsc should find everything.
  4. <year> <hyph> <year> <hyph> <year> <hyph> - when starting on <year>, nsc will find all other <year>, and need #Rs from <hyph> to <year>. When starting on <hyph>, nsc should (w/o any bugs) find everything.
I coded for 1, 2, 3, but not 4. I might be able to tweak nav_year to find odd <hyph>, but only for adjacent years (i.e. 2010–11 or 2010–2011, and not 2010–2012). If I can, that would eliminate the need for #Rs in 2, 3, 4.
The reason the missing <hyph> cats don't show up on 2008–09 W-League (Australia) might be b/c the "-" is messing with the regex & needs to be escaped. Will work on this soon.   ~ Tom.Reding (talkdgaf)  11:03, 10 October 2021 (UTC)
 Done - all 4 cases accounted for. This should significantly reduce the # of {{R from category navigation}} needed. As a result, some now-unnecessary #Rs may need to be CSD'd. The best place to find them would be between the new Category:Navseasoncats year and range (0) and Category:Navseasoncats year redirected (0).   ~ Tom.Reding (talkdgaf)  02:18, 16 October 2021 (UTC)
 Done - the category intersection b/w Navseasoncats year and range & Navseasoncats year redirected is now cleared of all (several dozen) now-obsolete {{R from category navigation}}. I think I'll split off base-change-#Rs from Navseasoncats year redirected into Navseasoncats year redirected (base change), to help isolate potential exceptions that can be coded for in Navseasoncats year redirected (other), to reduce reliance on {{R from category navigation}} except when necessary.   ~ Tom.Reding (talkdgaf)  13:07, 17 October 2021 (UTC)
 Done   ~ Tom.Reding (talkdgaf)  15:57, 17 October 2021 (UTC)

Redirect using template:title year

Following Wikipedia:Categories_for_discussion/Log/2021_August_4#More_pre-indepdendence_"Mexico"_categories and Wikipedia:Categories_for_discussion/Log/2021_September_23#More_pre-independence_Mexico_categories, I used

{{category redirect|{{title year}} in New Spain}}

at Category:1786 in Mexico. This worked, but caused [[:Category:{{title year|1786]] to appear in Navseasoncats on Category:1785_in_Mexico. That one doesn't matter, because that page too will be redirected, but there might be cases at the end of ranges where it would be useful to fix this.

This is a low-priority request. But it is currently showing at Category:1731 in Mexico. – Fayenatic London 17:48, 25 October 2021 (UTC)

@Tom.Reding: it may be a temporary situation, but these are gaining in number, e.g. Category:1680s in Mexico. – Fayenatic London 07:46, 30 October 2021 (UTC)
 Done! As a future-proofing bonus, any null-parameter template will also be evaluated, such as {{Title number}}, etc. I decided to not allow parameters in {{Title year}}, etc., because KISS, and I couldn't think of an example that would need a parameter. Any parameters & other errors are now tracked in Category:Navseasoncats redirection error (0). If a legitimate example presents itself, then I'll work on it.   ~ Tom.Reding (talkdgaf)  14:52, 31 October 2021 (UTC)
Wow, it looks as if that was rather a lot of work. Thanks again, Tom. No doubt at least 8 Out of 10 Cats will prefer it. – Fayenatic London 15:14, 31 October 2021 (UTC)

Hard cases with gaps

@Tom.Reding: these are finding series before/after the gap, but can't find each other:

Category:Odisha MLAs 1957–1961
Category:Odisha MLAs 1967–1971

It's good enough to add "preceding category", but who knows what wonders you may be able to perform! – Fayenatic London 23:33, 4 November 2021 (UTC)

 Done! I bumped the gap size limit from 5 to 6. This raised the expensive parser function count from 135 to 168 on those cats (and I might need to reshuffle/add more testcase pages). I prefer to do this on an as-needed basis (i.e. slowly), so as to more precisely determine knock-on effects (if any), or to prevent accidentally hitting the 500 limit on some strange cats out there. I've asked for the ability to track the EPFC, but that will probably take a while, if it happens at all.   ~ Tom.Reding (talkdgaf)  12:00, 5 November 2021 (UTC)
Wow again! I have removed the succeeding / preceding category templates now. – Fayenatic London 12:04, 5 November 2021 (UTC)

Unintended global variables

@Tom.Reding: I have been asked at bnwiki to help localize the module for them. It's amazing how much work that module does! I'm grinding away with a generic system because I've been asked to do this sort of thing before and often they just need numbers translated to and from English.

You have updated a few comments in the sandbox and I'm pretty sure you want that kept. I would like to tweak a couple of things:

  • Remove trailing whitespace.
  • Remove unintended global variables.
  • Possibly replace code like title.new(full, 'Category').exists with a call to a function so all those tests are in one place. That's needed at bnwiki because I have to translate the title to the local language before testing whether the page exists.

Some of the globals are easily fixed but others will require changing the order in which functions are defined. I'll try to make the diffs in the sandbox comprehensible. Is this ok? Any thoughts?

Johnuniq (talk) 01:02, 26 March 2022 (UTC)

@Johnuniq: I'm going to be unavailable for another few days but will take a closer look at this this week. I'd like to help with this if/where I can. This localization will presumably make it easier to localize elsewhere, and not be a bnwiki-only change?   ~ Tom.Reding (talkdgaf)  13:20, 27 March 2022 (UTC)
No rush! I'm not aiming to add localization to this module—that would be difficult and ugly. I might do a couple of small things such as putting all the exists tests in one place, but at bnwiki I'm trying to use a somewhat generic wrapper module which translates parameters from the local language to English before the module does its work, and translates in reverse when it's finished. That might not be enough but it would be better than what they've got now. The wrapper would be usable on other languages. Johnuniq (talk) 22:04, 27 March 2022 (UTC)
I did the changes mentioned above in the sandbox. Please have a look when you have some time. Johnuniq (talk) 09:12, 28 March 2022 (UTC)
And when you really have some time, please have a look at diff. That shows an edit I made to the module at bnwiki when I was trying a brute-force approach to localizing it (now abandoned). I haven't signed off on it yet but I suspect the code is good and should be used. That's in function nav_hyphen. Johnuniq (talk) 08:51, 29 March 2022 (UTC)
Re the above struck-out comment, I thought about it some more and think that it is worthwhile so I have put the edit in Module:Navseasoncats/sandbox. Please check diff. Johnuniq (talk) 04:43, 3 April 2022 (UTC)
I just reverted that because it is obviously broken. Johnuniq (talk) 07:35, 10 April 2022 (UTC)

Using cat parameter with redirects to span country name changes

For info, I used {{navseasoncats|cat=18th-century Russian people}} on Category:18th-century people from the Russian Empire and similarly on all of its sub-cats and their C19 siblings. There were already redirects such as Category:18th-century Russian people, which allowed navigation to the Russian Empire categories from C17, C20 & C21. Adding the parameter into navseasoncats for C18 and C19 makes use of these and provides links to all the other centuries, without having to set up redirects at e.g. "21st-century people from the Russian Empire".

This method may be useful for other countries. Category:19th-century Belgian people already links to Habsburg, Spanish and Austrian Netherlands categories, as these correspond closely enough to C16, C17 and C18, but this method has not yet been applied to occupational sub-cats. – Fayenatic London 11:10, 8 October 2022 (UTC)

Navseasoncats is shown vertically

Hello. Just noticed that the output box is desplayed vertically at Category:Bacteria described in 2019. I don't know what caused this issue and since when it is being shown like this. Thanks. Jeeputer Talk 14:15, 15 January 2023 (UTC)

Couldn't say. It showed up vertically but I purged the cache and it appears normally now. Primefac (talk) 10:55, 16 January 2023 (UTC)
I came here because I also saw this on Category:9th-century Lombard people. But then I saw your messages, purged the cache and it's back to normal. Funny that this should happen to at least two categories on the same week. I had never seen this problem with displaying a range of dates/centuries before. Liz Read! Talk! 19:17, 16 January 2023 (UTC)
And now Category:1022 beginnings as well. I won't post any more I come across but this seems to be a new issue, I'm not sure if it's a problem with the template or something else causing this. Liz Read! Talk! 19:26, 16 January 2023 (UTC)

@Jeeputer, Primefac, and Liz: has this stopped happening? If so, I'm curious as to when it stopped. As to what caused it, my guess would be either one of the subtemplates changed temporarily, or something possibly farther-back-end than that. No problems for me when visiting those categories for the first time just now, but I'm a little late to the party.   ~ Tom.Reding (talkdgaf)  20:27, 12 February 2023 (UTC)

Given that I never saw the issue, I couldn't say. Primefac (talk) 20:50, 12 February 2023 (UTC)
@Tom.Reding: Looks like it has stopped. I have been doing categories for almost a month (after I saw this issue), but I didn't face that again. That was only on a few categories for that one single day I think, and is gone now. Thanks @Primefac and @Liz for their answers. Sorry I forgot to subscribe to this thread. Jeeputer Talk 20:55, 12 February 2023 (UTC)

reducing hlist surface

I've modified the sandbox to use Module:List instead of coding it with hlist in the table class. All the tests appear to function appropriate ignoring that change and I'll move this live in the morning.

One concern that I observed that caused a double take was that there is something outputting definition lists in the test cases. This occurs both before and after the sandbox changes I made as well as the live module apparently. I do not know if those are intended to be there in that context. Izno (talk) 03:55, 28 December 2022 (UTC)

@Izno: do you remember which testcase(s) was/were having that problem, or could you re-find it/them? There are 13 testcase pages ({{Navseasoncats testcase nav}} :). I looked through them all just now and didn't see anything unusual.   ~ Tom.Reding (talkdgaf)  13:52, 3 July 2023 (UTC)

@Tom.Reding Template:Navseasoncats/testcases#BCE exhibits the issue in the first pair of tests, but I see it in all other tests also.

<h2><span class="mw-headline" id="BCE">BCE</span>...</h2>
<ul>...</ul>
<table class="toccolours" style="text-align: center; margin: auto;">
<tbody><tr>
<td>
<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><div class="hlist">...</div>
</td></tr></tbody></table>
<dl><dd><dl><dd></dd></dl></dd></dl>

Izno (talk) 18:31, 3 July 2023 (UTC)

Module:Resolve category redirect

@Tom.Reding: should Module:Navseasoncats use Module:Resolve category redirect instead of function rtarget?

Module:Resolve category redirect is a fork (made by me) of the clever code you wrote in function rtarget. However, Module:Resolve category redirect has now diverged a little, with some tweaks I made to reject incompatible characters. Also, the code uses a list of redirects to {{Category redirect}}, which may need maintenance.

Wouldn't it be better to have the code in just one place? I know it's a bit cheeky of me to suggest that my fork should usurp its parent, but I don't think that two versions of the same code is a great idea. Module:Resolve category redirect has kinda take off, and is no longer the wee niche tool I thought it would be. BrownHairedGirl (talk) • (contribs) 17:58, 18 June 2023 (UTC)

@BrownHairedGirl: yes, it should! I can do that soon.   ~ Tom.Reding (talkdgaf)  13:23, 2 July 2023 (UTC)
@BrownHairedGirl: on closer inspection, function rtarget performs NSC-specific operations in its for-loop that are incompatible with Module:Resolve category redirect's current functionality - like evaluating {{Title year}} in {{Category redirect}}'s parameter, and adding it to a NSC tracking category if that fails. Currently, there's no way to do this with Module:Resolve category redirect. RCR would have to return a pass/fail flag to be useful in this way, to tell the caller whether it's returning the passed cat because of a failure, or because there's no redirect to follow, and it would have to do this without interfering with RCR's current usage.   ~ Tom.Reding (talkdgaf)  13:42, 3 July 2023 (UTC)
Thanks for the diligent scrutiny, @Tom.Reding. I hadn't considered that issue, and parts of it probably relate to functionality which I removed when creating Module:Resolve category redirect. So, my bad for not recalling that.
Also, I recently added to RCR some code to ignore titles with templates in them, so that's a further divergence.
Note that RCR doesn't handle {{title year}} and {{title decade}}, causing problems kindly spotted by the wonderful @Fayenatic london. So I did an AWB run to replace them with actual numbers. Obviously, new uses of those templates will be created in good faith, so it might be helpful to add that functionality to RCR, if either of us ever has the energy.
Credit where credit's due – it was Frietjes. (here) – Fayenatic London 16:00, 3 July 2023 (UTC)
Ah. Sorry @Frietjes. And thanks to @Fayenatic london for the correction. BrownHairedGirl (talk) • (contribs) 19:49, 9 July 2023 (UTC)
However, one aspect that should always remain common to the two modules is the list of redirects to {{Category redirect}}. Would it be a good idea to move that to a shared module, to a avoid having two copies of it? Or would it be better to just add a wee comment to each module noting that the two should always be in sync? BrownHairedGirl (talk) • (contribs) 14:05, 3 July 2023 (UTC)
@BrownHairedGirl: done! I created a shared module, Module:Template redirect regex, as a general repository for redirect regexes, should it be useful for other templates, and updated the NSC & RCR sandboxes to use it, for inspection/comment before publishing live. Both templates' testcases look good.   ~ Tom.Reding (talkdgaf)  19:11, 9 July 2023 (UTC)
Great work yet again, @Tom.Reding. The testcases all look fine to me and I like the way that you have made it a general repository for redirect regexes.
Please feel free to go live. BrownHairedGirl (talk) • (contribs) 20:13, 9 July 2023 (UTC)
 Done!   ~ Tom.Reding (talkdgaf)  14:56, 16 July 2023 (UTC)

Requested move 22 October 2023

The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.

The result of the move request was: moved to Template:Category series navigation. This option has at least some level of support from most participants here and is the clear consensus choice. (closed by non-admin page mover) Elli (talk | contribs) 03:37, 31 October 2023 (UTC)


– The current name for this category is too specific. Its documentation says it "is intended to be a minimal-input, near-universal template for automatically navigating most sequential categories", and only two of the 15 examples immediately following are are for seasons. Thus, the current name violates TMP, which says "[t]emplate function should be clear from the template name". Of course, the proposed name is longer, but we can use/create redirects as needed .
Two other notes. There is also the (current) name of Template:Irregular chronology category navigation, which was previously called Template:Irregular navseasoncats before a WP:BOLDMOVE. There was a previous discussion at Template talk:Navseasoncats/Archive 1#Requested move 25 May 2019, which resulted in no consensus. However, the proposed name at that discussion was overly broad which resulted in a smattering of different suggestions.
Pinging participants of that earlier discussion: @Amakuru, BD2412, Fayenatic london, Gonnym, Marcocapelle, Steel1943, and Tom.Reding.
HouseBlastertalk 00:09, 22 October 2023 (UTC)
  • Oppose - not all categories serviced are chronological.   ~ Tom.Reding (talkdgaf)  02:14, 22 October 2023 (UTC)
    • Would "sequential category navigation" be more appropriate? I realize that this template is not the only one used for sequential navigation, but it is the "main" one (in the way that e.g. {{talk header}} is not the only banner that can be put at the top of a talk page, {{hat}} is not the only template to collapse content, etc.). HouseBlastertalk 02:47, 22 October 2023 (UTC)
  • I agree that "sequential category navigation" would be a lot clearer. I wonder if for templates it really matters if the name isn't as clear as possible. Marcocapelle (talk) 06:02, 22 October 2023 (UTC)
    Yes, it does. It's also in the guideline WP:TPN Template names are easiest to remember if they follow standard English spelling, spacing, and capitalization. Gonnym (talk) 09:33, 22 October 2023 (UTC)
    I don't see why clarity shouldn't matter for template names. I have been meaning to do this RM for a while – when I first saw this template, I had to go to the template page to see why a template for "seasons" was on a page about terms in office. I can't imagine the name is helping the already steep learning curve needed to get involved with categories. HouseBlastertalk 15:56, 22 October 2023 (UTC)
  • Support any name that isn't the awful "navseasoncats". I appreciate all the work Tom has done here but I really don't understand their persistent on keeping this horrible name that does not make sense in most of its usages. They argue that not all categories serviced are chronological yet they ignore the fact that most of them are not "season" which is in the article title. Gonnym (talk) 09:36, 22 October 2023 (UTC)
    Since the proposal to change the name is based on naming accuracy, the new name should follow those same guidelines.   ~ Tom.Reding (talkdgaf)  12:32, 22 October 2023 (UTC)
    It follows it better than the current name. So imperfect name > horrible name. Gonnym (talk) 15:49, 22 October 2023 (UTC)
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Asymmetry when skipping gaps

The template finds Category:1995–96 in Federal Republic of Yugoslavia basketball skipping a 3-season gap going forwards from Category:1991–92 in Yugoslav basketball (via redirect Category:1995–96 in Yugoslav basketball). However, it does not work backwards, despite the existence of redirect Category:1991–92 in Federal Republic of Yugoslavia basketball. – Fayenatic London 14:09, 5 December 2023 (UTC)

 Fixed!   ~ Tom.Reding (talkdgaf)  16:22, 5 December 2023 (UTC)
Thanks for the quick fix, Tom.Reding! But look, past the linked years, now they both show grey years out of sequence. 😀 – Fayenatic London 17:24, 5 December 2023 (UTC)

Also (different problem?), there is no 2001–02 in that series; Category:2000–01 in Federal Republic of Yugoslavia basketball links forward twice to 2002-03, but there is no duplication looking back from Category:2002–03 in Federal Republic of Yugoslavia basketball. – Fayenatic London 14:14, 5 December 2023 (UTC)

 Fixed!   ~ Tom.Reding (talkdgaf)  16:22, 5 December 2023 (UTC)
Thanks for this too; but now 2003–04 is shown twice in grey! – Fayenatic London 17:24, 5 December 2023 (UTC)
 Both fixed now, I think. Can you confirm? (I could not find any out-of-sequence years, only dups)   ~ Tom.Reding (talkdgaf)  17:41, 5 December 2023 (UTC)
Category:1991–92 in Yugoslav basketball shows 1988–89 1989–90 1990–91 1991–92 1995–96 1993–94 1994–95. The last two are earlier than 1995-96, not later. Likewise 1992–93 1993–94 show at the beginning of the box on the 1995-96 page, before the link to 1991-92. – Fayenatic London 08:19, 6 December 2023 (UTC)
 Fixed (probably). Fantastic, I even found a few more and put them in a new, dedicated testcases16. The new grey ranges follow the term length and term gap precedents set by and around the parent to create plausible future ranges (but with irregular hyphenated seasons those can change wildly from element to element), as they did before, but they should now all be stepping inexorably into the future, without any out-of-sequence backtracking. Great find, and a very satisfying, albeit tricky to nail down, fix! I've looked through all the testcase pages and I don't see anything amiss, but I can't help but feel there's another 'gotcha' lurking somewhere out there...   ~ Tom.Reding (talkdgaf)  17:36, 6 December 2023 (UTC)
OK, 1991–92 is now showing what I would expect, but on 1995–96 the nav box still starts "1992–93 1993–94 1991–92 1995–96"… – Fayenatic London 22:46, 6 December 2023 (UTC)
@Fayenatic london: of course I forgot about the backwards case. Fourth time's the charm?   ~ Tom.Reding (talkdgaf)  02:26, 7 December 2023 (UTC)
(belated reply) Yes, all looks good now, thanks again. – Fayenatic London 08:58, 19 December 2023 (UTC)
Here's a different kind of asymmetry: Category:2000–01 in European football links to years interspersed with 2-year seasons, but Category:2000 in European football links only to years. Is that working as expected? – Fayenatic London 12:58, 19 December 2023 (UTC)
@Fayenatic london: as expected? Yes. As ultimately desired? No.
When starting out, the main objective of the module was to not break the then-current navseasoncats usage, so the then-separate templates were ported nearly 1-to-1 from template code to Lua, with only essential changes. Efficiencies and improvements were found, and it grew from there, and here we are. Greatly expanding the functionality of the nav_hyphen function has drawn closer the time for incorporating nav_year into it (or at least mimicking its functionality), so as to carry forward all the bug fixes, idiosyncratic accommodations, and little tweaks made in nav_hyphen. nav_year has its own set of improvements that I am anxious that I'll break when drastically changing it (like the recognition of AD/BC/BCE, which nav_hyphen doesn't have to worry about), which are smaller in number, but apply to the majority of categories (~75%).
Perhaps it would be better to generalize nav_hyphen's searching behavior instead of merging functions. I'll have to figure out what the best option is. Balancing greed with simplicity will be important. The goals of either/any option would be to resolve such inconsistencies as in the Category:2000–01 in European football series, and to allow nav_year's |skip-gaps= parameter to be used on hyphenated cats, but without overrunning the expensive parser function count limit (which might limit the range of |skip-gaps=, and hopefully nothing else, but we'll see), while not breaking anything.   ~ Tom.Reding (talkdgaf)  14:48, 19 December 2023 (UTC)

Displaying only the next and previous year

{{2021 wildfires}} includes two links to the next and previous year, without the current year:

◀ 2020 2022 ▶

Can {{navseasoncats}} display links in this format, or is there another template that does this? Jarble (talk) 17:20, 11 October 2023 (UTC)

Why would you only want two links in a cat as opposed to the current work which shows multiple other years? Also, I have removed the links to the templates - we should not link other templates in templates - and have replaced them with article links. Primefac (talk) 08:49, 12 October 2023 (UTC)
Good start, Primefac. I reinstated the inter-template links in the documentation, and rolled out your change to the rest of that series of templates. – Fayenatic London 11:45, 4 November 2023 (UTC)

@Primefac and Fayenatic london: I see many templates like {{Earthquakes in 2023}} that include links to the current year, previous year, and following year:

<span class="summary">[[List of earthquakes in 2023|Earthquakes in <span class="dtstart">2023</span>]]</span>

Can we use a template to generate these links, instead of formatting them manually like this? Jarble (talk) 16:49, 19 December 2023 (UTC)

{{LaunchesByYear header}} apparently does this, but it's only intended for navboxes about one specific topic. Jarble (talk) 17:07, 19 December 2023 (UTC)

If there are enough templates like this that would benefit, sure. Primefac (talk) 18:03, 19 December 2023 (UTC)
I see that the above example requires a year parameter to be entered, e.g. |2011 in Template:Orbital launches in 2011. As far as I know it would not be possible to make it parameterless like {{Category series navigation}}, because the final templates are used on articles that do not contain the year in the page name.
I also found Template:Football seasons in Sweden which could be made parameterless, because it is used on pages such as 1957–58 in Swedish football. – Fayenatic London 17:53, 20 December 2023 (UTC)
I think the point is that in the navbox, instead of typing out a linked ← <main> →, a template call could be made that would do the same thing (with an entered parameter). Primefac (talk) 18:12, 20 December 2023 (UTC)

Generating lists of articles instead of categories

I'm trying to refactor some templates like this one that include lists of articles in chronological order. Does {{Category series navigation}} have an option to generate lists of articles instead of categories, or is there another template that does this? Jarble (talk) 19:33, 20 December 2023 (UTC)

@Jarble: there's no option for articles here, and no general templates that come to mind, just the very specific ones like in your example.   ~ Tom.Reding (talkdgaf)  20:04, 20 December 2023 (UTC)

Is there also an option to generate bulleted lists like the ones in this template? Jarble (talk) 19:56, 20 December 2023 (UTC)

@Jarble: use that template as a starting point to make your own.   ~ Tom.Reding (talkdgaf)  20:04, 20 December 2023 (UTC)
@Tom.Reding and Jonesey95: I created a template to do this, but it was nominated for deletion several days later. Jarble (talk) 18:39, 28 December 2023 (UTC)
A page in template space with no documentation and that is not transcluded anywhere is likely to be nominated for deletion. If you add a bit of documentation (copy relevant text from a similar documentation page) and transclude the template in your user sandbox by typing {{Century in topic}} (add parameters as appropriate), the nomination may be closed as "keep". – Jonesey95 (talk) 21:58, 28 December 2023 (UTC)