Template talk:World topic

This template will be re-written as a Lua module
See the discussion at WP:Lua/To do. Jarble (talk) 05:22, 19 June 2015 (UTC)
 * But the continent-specific templates have not yet been rewritten. See the discussion below. Jarble (talk) 17:13, 15 October 2023 (UTC)

Palestine
World topic, as used in World, links to dab page Palestine rather than article State of Palestine. Changing Module:World topic to Palestine = {"State of Palestine"}, would fix it but remove Music of Palestine from Music topics. I could add a redirect from Music of State of Palestine but we wouldn't want that linked from articles like History of music in the biblical period and other topics will be similarly affected. Suggestions please! Certes (talk) 14:28, 28 June 2020 (UTC)
 * Well, yes. The first thing Music of Palestine brought to my mind was West–Eastern Divan Orchestra; definitely post-biblical. Narky Blert (talk) 14:55, 28 June 2020 (UTC)

Dealing with spelling variations
For the use of this template at Labor_rights, we're running into issues, because it's missing articles like Labour rights in New Zealand, which uses the British spelling. Could we make this template more flexible so that it can handle this (or, if that flexibility already exists somehow, document it)? &#123;{u&#124; Sdkb  }&#125;  talk 23:34, 29 November 2020 (UTC)
 * Hmm, creating a redirect seems to have fixed the issue for New Zealand, but it'd still be nice to deal with this in case there are other country pages (now or in the future) with this issue. &#123;{u&#124; Sdkb  }&#125;  talk 23:38, 29 November 2020 (UTC)
 * Redirects seem as good a place as any to record that information about labor is filed under "labour", and they also have the usual other benefits. Certes (talk) 00:43, 30 November 2020 (UTC)

Libya
The entry for Libya links to Parliament of Libya, a disambiguation page. It should link to House of Representatives (Libya), the country's current legislature. — Shelf Skewed  Talk  14:40, 17 September 2022 (UTC)

noredlinks not suppressing redlinks
The world topic of 'banking' has  passed in, but shows a redlink for Banking in the World. Banking in the United States is where I noticed this. SWinxy (talk) 23:45, 21 September 2022 (UTC)

Links
I've enhanced Module:World topic/sandbox to vary national links using parameters of the form American Foo. Would anyone like to check this over before I put it live? New template Football in the World shows an example of its use: the Canada and U.S. links work only with the sandbox version. I've also taken the opportunity to refactor the relevant function, which is now called links. Certes (talk) 21:20, 3 December 2022 (UTC)


 * Change released to Module:World topic. Certes (talk) 10:33, 9 December 2022 (UTC)
 * @Certes: It is an interesting choice to loop through all the args looking for country link overrides vs. looping through the countries looking for country link overrides in args. The module controls the list of countries but it has no control over the args. Looping over the args causes all the args to be expanded (even if they are otherwise not used). Some side effects of your choice (besides the args expansions) include link_United States being an alias for link_United_States and that link_, link__, link_xyzzy causes (unused) entries in  to exist. Another minor issue is if both link_United States and link_United_States are given, there is no way to know which will actually be used as the traversal order over args is not fixed (and whichever is last will write over the earlier one). It seems to me it would have made more sense to use the country codes as the parameter names as is done in other topic templates like, where one can override the link for Spain with ES (including specifying it empty to have the link removed). —Uzume (talk) 15:13, 28 May 2023 (UTC)
 * Please feel free to re-implement the change using a technique similar to Europe topic if you feel that's better. Football in the World seems to be the only user of link_* so, with a simple change there, the topic change needn't be backwards compatible. Certes (talk) 15:29, 28 May 2023 (UTC)
 * @Certes: Well that would require the module to have some understanding of such country codes which it currently does not seem to. I am tempted to create a Module:Region topic/World and then have Module:World topic use Module:Region topic with that (but that seems like a lot of work to check what is using what to ensure nothing breaks). —Uzume (talk) 15:45, 28 May 2023 (UTC)
 * Yes, I decided it wasn't immediately obvious how to translate US into "United States", which is why the module is how it is. I don't think looping through the args and expanding them all is a major performance problem: even a relatively complicated call like the football one passes only five args. Certes (talk) 18:25, 28 May 2023 (UTC)

Does the "image" parameter work as intended?
I tried to include an image in this template using the "image" parameter:

But then the image doesn't appear. The template's documentation doesn't explain how this parameter should be used; does it still work as intended? Jarble (talk) 19:20, 7 December 2022 (UTC)
 * It seems to work if you make a link and supply any extra parameters.


 * – Certes (talk) 19:36, 7 December 2022 (UTC)

Is there an option to show countries grouped by continent?
I've seen templates like this one that show lists of countries grouped by continent. I'd like to refactor some of these templates using the "World topic" template; does it have an option to group the countries this way? Jarble (talk) 23:41, 9 December 2022 (UTC)


 * No. It could be added to Module:World topic, but some countries span more than one continent. Certes (talk) 14:19, 10 December 2022 (UTC)
 * If the countries are grouped by continent, the lists of countries should be the same as in the continent-specific templates (Africa topic, Asia topic, etc). Jarble (talk) 16:30, 10 December 2022 (UTC)
 * You could just call the continental templates from one wrapper template, though you might need options to exclude places like Ceuta which don't appear on the World template. Certes (talk) 16:40, 10 December 2022 (UTC)
 * Is it possible to include a continental template as a "child navbox" within another template? I tried to do this, but it didn't display correctly:


 * — Preceding unsigned comment added by Jarble (talk • contribs) 19:47, 19 December 2022 (UTC)
 * @Jarble: That depends on the template. As luck would have it, you can with but you cannot accomplish that via 1 but rather via border.  does allow one to use 1 as an alias for border and although  passes border through it also uses 1 for something else.


 * —Uzume (talk) 15:36, 28 May 2023 (UTC)

Adding spaces after the suffix
When I try to use a suffix with this template, it adds the suffix to the previous word without spaces between the words:

Is there an option to add a space to the suffix (and omit the space from the prefix) so that these page titles display correctly? Jarble (talk) 15:33, 14 June 2023 (UTC)


 * As for the prefix, Module:World topic adds a space after any prefix. My recent change didn't touch that part of the code, and there's no obvious way to get rid of it other than by enhancing the module thinking carefully about backwards compatibility.  As for the suffix, MediaWiki strips leading (and trailing) spaces from named template parameters but replacing them by &amp;nbsp; works, e.g. &amp;nbsp;relations. Certes (talk) 19:18, 8 July 2023 (UTC)

Resolving category redirects
As noted above at, redirects are used in some cases, but in the case of category redirects they are not resolved automatically. E.g. see the link to Thailand at the end of List of strikes.

Please can resolve category redirect be applied if the prefix starts with :Category ? – Fayenatic  L ondon 09:22, 22 August 2023 (UTC)

Addition of multiple prefixes?
On the page Intangible cultural heritage, this template is used:

The articles Intangible Cultural Heritage of Indonesia and Intangible Cultural Heritage of Ukraine are not added to the template, as the phrase "Cultural Heritage" is capitalized. Is there any way to add two prefixes (one non-capitalized and one capitalized)? Or is renaming the articles the only way to fix this? Shwabb1 (talk) 16:48, 16 September 2023 (UTC)


 * Renaming the articles seems best, as titles are written in sentence case on Wikipedia. If that's not possible for some reason (perhaps Intangible Cultural Heritage of Somewhere is a proper noun used widely in English-language sources) then a redirect from sentence case is second choice. Certes (talk) 17:31, 16 September 2023 (UTC)
 * The UNESCO list is capitalized, but the phrase intangible cultural heritage on its own is not. Whether the national lists are capitalized depends on the country. It's difficult to resolve the situation, so I added redirects as you suggested. Shwabb1 (talk) 07:05, 17 September 2023 (UTC)
 * UNESCO also capitalises "Need of Urgent Safeguarding". I think they're just Using Capitals Everywhere to make them Sound More Important, but if that's the off-wiki usage then redirects do the job. Certes (talk) 10:42, 17 September 2023 (UTC)

Refactoring continent-specific templates
Can we add a "continent" parameter to this template in order to refactor Africa topic and the other continent-specific templates?

For instance:

should be equivalent to

This will require only a few small changes to Module:World topic. Jarble (talk) 17:08, 15 October 2023 (UTC)

How to add a country to <> template
I want to add Visual arts in Israel to the template Visual art of the World. I don't get how to do it, any help? Homerethegreat (talk) 13:58, 31 December 2023 (UTC)


 * There is no Template:Visual art of the World. If you want to add Visual arts in Israel to the "Visual art of the World" navbox (wikitext ), create a redirect called  to target Visual arts in Israel, and it will appear automatically. Certes (talk) 16:16, 31 December 2023 (UTC)
 * It worked! Thank you so much for the help! Happy new year! Homerethegreat (talk) 08:53, 1 January 2024 (UTC)