Template talk:Country label/N
Cat parameter[edit]
@BigDom: Noting your edit, the answer is that the cat parameter should not be necessary if the country's category name is the same as the switch value, which it should be in 99.9% of cases. There was a point early in the template development where I was adding cat to all entries (I think the template was using that parameter differently) but that was long ago, and you can see that most entries do not have a cat parameter set. As for Poland and Portugal, their main categories are the eponymous Poland and Portugal respectively, so they should not need a cat parameter. That said, I am assuming that you are finding that this has broken something on a client page somewhere, and tracked it down to these two having their cat parameter removed. Since this should not be happening, I would like to debug the issue, so if you could provide the client page where you witnessed the effect, that would be very helpful. If there is some other reason you feel the cat parameter should be retained, let me know, as I was close to being able to remove the need for the cat parameter entirely and cleaning up the code. Thanks! Josh (talk) 15:56, 5 December 2023 (UTC)
- Hi @Josh: This was related to issues with the Category:Poland photographs taken on XXXX-XX-XX and Category:Portugal photographs taken on XXXX-XX-XX (see e.g. Category:Poland photographs taken on 2023-11-11). These category pages are created using either {{World photos}} or e.g. {{Poland photographs taken on navbox}}, both of which call {{Country photographs taken on}}, which in turn directly references the cat parameter in {{Country label}}, hence the issue arose when this parameter was removed. Hope this makes sense. Cheers, BigDom (talk) 18:00, 5 December 2023 (UTC)
- @BigDom: that was perfect. I was able to quickly find the source of the issue, and why removal of the cat parameter from 'country label' was causing 'country photographs taken on' to fail. I have added a bit to that template to check if the cat parameter is set, and only use it if it is, otherwise fall back to the country name as given. Thanks! Josh (talk) 18:10, 5 December 2023 (UTC)