Template talk:Canada by province category navigation
(Redirected from Template talk:CanadaByProvinceCatNav/doc)
Latest comment: 1 year ago by BrownHairedGirl in topic When "provincial" or "territorial" are in the category title
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Is there an equivalent CatNav template for U.S. States and European countries?
editI am looking for something like Template:Europe topic, Template:European topic or Template:Topic (Europe), but as compact as Template:CanadaByProvinceCatNav so it is suitable for category use. Iketsi (talk) 03:21, 12 February 2020 (UTC)
When "provincial" or "territorial" are in the category title
editThis template doesn't work correctly when the category name contains the word "provincial" or "territorial". In this case the provincial ones link to each other and so do the territorial ones, but there is no linking between the provinces and the territories (because of the difference in title). Examples:
- Category:Ontario provincial electoral districts
- Category:Yukon territorial electoral districts
- Category:Provincial political parties in Alberta
- Category:Territorial political parties in Yukon
- Category:Provincial symbols of Saskatchewan
- Category:Territorial symbols of Nunavut
Can the template code be modified to work correctly in these cases? Set theorist (talk) 18:45, 16 May 2022 (UTC)
- Calling @BrownHairedGirl, you wrote the original code; do you know how to fix this problem? I know how to write templates, but modules confuse me. —Arctic Gnome (talk • contribs) 15:23, 9 June 2023 (UTC)
- Thanks for the ping, @Arctic.gnome.
- @Set theorist I am reviewing this, and making some tests. I hope to give a substantive reply within 24 hours. BrownHairedGirl (talk) • (contribs) 19:24, 9 June 2023 (UTC)
- I have a few technical issues to resolve, which may take a few days. But in the meantime, I did some scoping.
- This Petscan search for Ontario categories gives some pointers to the number of such sets. It returns 32 hits, some of which may be false positives (i.e. not part of a set), but if all of them are valid full sets, that would mean that 460 categories are involved. In reality I expect the total to be about half that, 'cos some won't be sets, and not all the sets will be full sets (see e.g. how a similar search for Yukon gives only 7 hits). BrownHairedGirl (talk) • (contribs) 02:11, 10 June 2023 (UTC)
- Update. @Set theorist & @Arctic.gnome as a first step, I have enabled support for {{Category redirect}}s (with kind help from @Pppery).
- For a test case, I created Category:Yukon provincial electoral districts as a redirect to Category:Yukon territorial electoral districts. As a result, the navbox on Category:Ontario provincial electoral districts now links to Yukon.
- My initial thought had been that support for {{Category redirect}}s would be sufficient, I reckoned that this was probably an edge case could be resolved with a few dozen redirects. But my scoping tests (see above) indicate this this would need a few hundred redirects, which would be ugly and laborious. So sometime in the next few days, I will try to find time to implement direct support of the territorial/provincial variation. BrownHairedGirl (talk) • (contribs) 11:54, 12 June 2023 (UTC)