Jump to content

Template talk:Country topics

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

Background zebra-stripes/watermark in white-space not showing up

[edit]

Hi, just a stylistic quibble about the (great) new country template.

It looks perfect on the blank template page.

In operation though, I can't see the faint zebra-stripes/watermark (gray, white, gray, white) in the white-space background that helps people visually keep track of what sub-section they are looking across.

For example, on the Ecuador topics page. http://wiki.riteme.site/wiki/Template:Ecuador_topics

I can see one grey-shaded bar at the bottom (across the culture subsection), but all the rest of the background shows up white.

I hope this makes sense!

Thank you, 0Juniper56 (talk) 07:00, 6 December 2012 (UTC)[reply]

Thanks for your message, 0Juniper56. I think what you're reporting might be an unforeseen side-effect of the way the groups of links are numbered: not consecutively, to allow the occasional insertion of a custom group or two. But that means the alternation between odd and even-numbered groups mostly disappears – and hence, I'm guessing, the desired zebra-striping with it. So, I've just tried amending the template to avoid that (although not always eliminate it); any difference / improvement where you are? CsDix (talk) 15:42, 6 December 2012 (UTC)[reply]
zebra-stripes are possible, but it would be somewhat painful. basically, we would have to use the same numeric shift operation used in the first few rows, but for all the groups/lists. if it is really really important, I can make it work, but I would rather not :) Frietjes (talk) 21:34, 6 December 2012 (UTC)[reply]
Agreed -- but I'm hoping the amendment (workaround, fudge) I made will suffice 90% or more of the time. Let's see if/when 0Juniper56 reports back. CsDix (talk) 16:04, 7 December 2012 (UTC)[reply]

Problem when flag's file name doesn't match country name

[edit]

In Template:Macedonia topics, to fix a link to a disambiguation page, I changed the titlename to Republic of Macedonia and added the prefix "the". Even though Template:Country data Republic of Macedonia exists as a redirect, the flag doesn't show up because the flag is at File:Flag of Macedonia.svg, not File:Flag of the Republic of Macedonia.svg. I'm not sure what the best way to modify looking for the appropriate flagicon would be. Alternatively, a flaglink parameter could be added (and I'm clueless regarding the alt text) so the flag would link to Republic of Macedonia instead of Flag of Macedonia when the flagname parameter is used. TimBentley (talk) 21:51, 16 December 2012 (UTC)[reply]

Well, redirects aren't working, so we should probably ask for the flag to be moved. There's no reason it shouldn't be in line with the country article. CMD (talk) 04:30, 17 December 2012 (UTC)[reply]
I don't know why, but the flag is appearing now. I guess we just had to wait a few hours for the file redirect to work. TimBentley (talk) 13:38, 17 December 2012 (UTC)[reply]

WikiProject

[edit]

I have restored the parameters for a WikiProject. I believe that a wider discussion should take place before its removed - as it has been the norm in templates for years. I agree we have some policies that discourages this type of link, but it is the norm and these projects should not be hidden if the rest our projects are visible in this fashion. It was one of the proposed solution for making projects more visible - (will look for this discussion).17:53, 5 January 2013 (UTC)

wow, you royally screwed up the template, nice work! if you look at the diff, you did not just "restore the parameters for a WikiProject". I have reverted your vandalism. Frietjes (talk) 19:24, 5 January 2013 (UTC)[reply]
WOW very disappointing to see my good faith edit called vandalism - we have basic conduct expectations here - in the future pls try and give a proper evaluation of the situation. Now to the matter at hand - the parameter is the norm so why is it removed.Moxy (talk) 19:27, 5 January 2013 (UTC)[reply]
yes, the template should be fully protected to prevent editors who don't understand it from screwing it up. I would expect an experience editor to not engage is such reckless conduct. Frietjes (talk) 19:29, 5 January 2013 (UTC)[reply]
Perhaps you can explain the problem instead of more insults - do you have an opinion of the matter at hand?Moxy (talk) 19:34, 5 January 2013 (UTC)[reply]
perhaps since you are so experienced, you can explain how your edit only added a WikiProject link? Frietjes (talk) 19:37, 5 January 2013 (UTC)[reply]
All was working fine from what I can see - no errors same format that was there for a long time - pls explain the problem. Do you have an opinion of the matter at hand at all? Pls stop with the personal comments Moxy (talk) 19:40, 5 January 2013 (UTC)[reply]
all was not working fine, until I fixed it, explaining it to you would be pointless since it appears you cannot read the diff from your edit. however, if you really want to know why your edit screwed up the template, I will try to explain it to you in simple terms. Frietjes (talk) 16:49, 6 January 2013 (UTC)[reply]

since you seem to be so interested in understanding why your edits are so damaging, let's look at all your changes

  1. you changed {{{country|{{{territory|{{{region|{{{titlename}}}}}}}}}}}} to {{{titlename|{{{country|{{{territory|{{{region}}}}}}}}}}}} in many places. why did you feel the need to make this change? the parameter order in this construct is very important. we only want to use the value for "titlename" first for the edit links, not in other places in the template where we want to use the value for either country, territory, or region first.
  2. you changed |list{{#if:{{{geography|}}}{{{list2|}}}{{{history|}}}{{{list1|}}}|5|1}} = {{{list3|}}} to |list5 = {{{list3|}}}. why did you feel as though this list renumbering code was unnecessary? you see we must have list1 if we want the image to appear at the right. do you think we don't need this feature? if you want to remove the images, then there are easier ways to do that.
  3. you changed |list{{#if:{{{list3|}}}{{{geography|}}}{{{list2|}}}{{{history|}}}{{{list1|}}}|6|1}} = to |list6 =. again, I don't understand why you thought this list renumbering code was unnecessary.
if, as you say, your only problem was with this edit, then you should have undone this edit, and asked the editor who made that edit to discuss it. assuming that all the other edits after that edit were pointless is an incredible lack of assuming good faith. Frietjes (talk) 17:01, 6 January 2013 (UTC)[reply]
Great explanation - I understand your points - your right I coould have just reverted that one edit - I see now - that was not hard was it.Moxy (talk) 17:23, 6 January 2013 (UTC)[reply]

Outline and Index

[edit]

Could the outline and index be moved to the below line (with the portal, etc) to save a line? Putting them on a line by themselves at the top seems undue prominence. Kanguole 18:43, 7 January 2013 (UTC)[reply]

  • That could be an improvement, although I'd be inclined to give them a line of their own in the "below" area, like this:


...or maybe their own separate "pre-below" line, like this:


Thoughts? CsDix (talk) 08:27, 8 January 2013 (UTC)[reply]


Still seems like undue prominence to me. For comparison, I was suggesting

Kanguole 09:08, 8 January 2013 (UTC)[reply]


  • Ah, I see... Yes, that could work – except do you think there now might be a tendency toward too many icons in the "below" line..?
(For sake of comparison:)


CsDix (talk) 12:04, 8 January 2013 (UTC)[reply]
Yes, I agree that the icons aren't necessary. I'd also agree with Chipmunkdavis that WikiProject links don't belong in navigation targeted at readers[1]. Kanguole 12:24, 8 January 2013 (UTC)[reply]
  • I've now moved the Outline/Index links down to the below line and disabled the icons, but haven't disabled the WikiProject link as I'm not sure there's consensus to do so. (There may not be consensus about the Outline/Index links' new position either, but let's see what happens.) But disable the link (to see what happens) if you wish. Thanks for your input. CsDix (talk) 23:40, 8 January 2013 (UTC)[reply]

Template form

[edit]
  • Sorry coming to this conversation late I guess. :-( The below section in most templates are used for non-article destination links within Wikipedia like Cats, Books, Portals and projects pages that all have there own named tabs (Its also used to link to wiki sister pages to my dismay and against policy) - two examples below of the norm. Indexes, Outlines and Bibliographies (that is missing here) are main article pages used for direct article navigation. See our most seen country template Template:United States topics or any another should not be converted to this template without discussion at each template there are reasons projects opt out of using generic templates like with Template:Canada topics that was a very long debate on those horrible colors that in my opinion are the opposite of our policy on the matter etc.).Moxy (talk) 03:16, 9 January 2013 (UTC)[reply]


  • I've gained the impression that "Do something; see what happens; if/when anything does, discuss and perhaps amend/revert" is the editing norm here, rather than discuss each prospective edit first – but is this misguided?
If it's a norm for links such as the Outline and Index (and potential Bibliography) links to appear "above", then perhaps that's where they should return. Anyone else?
Meanwhile, thanks for your input. CsDix (talk) 10:35, 9 January 2013 (UTC)[reply]
PS That World War I template looks a bit top- (i.e. "above"-)heavy here (especially in a smaller window) and the number of Timeline subgroups might make a "Navbox with collapsible sections" (rather than a plain Navbox) a more appropriate base template..?
In both the country examples cited above the Outline, Index and Bibliography are in a final "Overviews" section within the box itself. Kanguole 11:52, 9 January 2013 (UTC)[reply]
Some countries have a topic section in the overview tab like List of Canada-related topics by provinces and territories. As for collapsible sections we should try to avoid putting in more barriers to seeing links - as in we should not make our readers have to click on "show" multiple times in the same template making it harder for those who aspire to derive serviceable information. Accessibility over style should always prevail. Template:People's Republic of China topics is simply horrible - why do we have to click on 6 different "show"s to see the information? As someone with MS your making me work for no reason to see the info/links - Apply the KISS principle to all that you do Moxy (talk) 17:31, 9 January 2013 (UTC)[reply]
"Some countries have a topic section in the overview tab..." – I'm not sure what you mean here (with apologies if I'm missing the obvious). As regards templates with collapsed sections, my understanding is that it's possible to have the relevant section already visible in articles that include these templates. To have them all made visible at the same time (which I think is also possible, or, at least, should be) would, I imagine, look like a case of information overload. But perhaps that's the rub: any template that includes that many links is probably including too many links...? CsDix (talk) 22:38, 10 January 2013 (UTC)[reply]
Have reverted the change to Template:United States topics as per all above. Pls stop these templates conversions to collapsible lists - did you not read anything above?. Pls do not put more obstacles/steps for our readers to derive serviceable information.
We should be trying to make the template more uniformed with others - not make it the odd ball. Lets look at some examples from a wide range of topics that I have had nothing to do with (never edited these templates)
  • Bio example
  • Tv example
  • Academic institution example
  • Automoltive example
  • Cosmology
  • Scientific data
  • Cuisine
  • The earth
  • Media
  • Economics
  • Literature
  • Ethnic
  • Military
  • ....Moxy (talk) 05:49, 12 January 2013 (UTC)[reply]


    • "We should be trying to make the template more uniformed with others..."
    That's an interesting selection of templates – thanks for assembling. But, before commenting on any of them, I don't understand how this template (Country topics) is non-uniform..? (Sorry if I'm missing something obvious.) CsDix (talk) 06:48, 12 January 2013 (UTC)[reply]
    Showing 2 things above - Firstly that the below section normally does not have links to non-Main namespace pages - as in the below links link to pages that have names spaces (a particular prefix recognized by the MediaWiki) like Portal namespace, Category namespace, Book namespace and Project namespace (see Wikipedia:Namespace) - thus the index. bib and outlines should be incorporated into the main body of the template like all other Main namespace pages. Secondly I am showing how we dont hide portions of the templates thus preventing our readers from having to click open multiple section to see all that the templates have to offer. Also despite the examples above we should not link to non-English wiki pages like commons to quote Wikipedia:Navigation templates "Navigation templates do not provide WP:External links to other websites" Wikicommoms is an external link. Moxy (talk) 07:07, 12 January 2013 (UTC)[reply]
    I don't think I mind whether or not the links along the bottom can include one to the Commons site (or to WikiProjects, something another user indicated as non-standard, but which is now back in the template). What I suppose would matter is if people were drawn into adding more and more links (external or internal) to that bottom line (in which case, its flexibility could be curtailed). As regards collapsible things, this template doesn't incorporate anything beyond the (seemingly standard) [show]/[hide] link in its titlebar. CsDix (talk) 08:37, 12 January 2013 (UTC)[reply]
    Agree - commons and project should not be there but they are the norm non the less. Could we move the Bib, Index, Outline and topics to its own section in the template titled Overviews - like at Template:Canada topics?Moxy (talk) 08:46, 12 January 2013 (UTC)[reply]
    The template did have the Outline and Index links placed in the "above" line – see here – how about that (plus a Bibliography link, when detected)..? CsDix (talk) 11:04, 13 January 2013 (UTC)[reply]
    Ok no one has objected to this idea - so lets try it - implemented .Moxy (talk) 23:04, 9 February 2013 (UTC)[reply]
    I've already objected to putting it at the top, making it unduly prominent. Indexing should go below the real information on the topic. Kanguole 23:18, 9 February 2013 (UTC)[reply]
    Dame did not see that one objection - fine fine - All I care is we get them off the bottom. Can othes have input here? Just want this template not to be the odd ball anymore - no articles name space in the below section for the love of god. And its still missing all the coding for bibliophiles. Moxy (talk) 23:25, 9 February 2013 (UTC)[reply]
    What about a separate section at the bottom as you suggested above based on Template:Canada topics? Kanguole 23:59, 9 February 2013 (UTC)[reply]
    YES YES - could you add coding for BIBs to - If this problem of the below section and bibs is fixed - all but the Canada one could be converted (dame the Canadians and there odd colors). The only 2 objects was from 3 projects that had there bibs disappear and.or the fact the below section had name space articles. Feb 10th - another project has drooped this template today - need to fix this (people are upset there consensus format was changed) Moxy (talk) 00:09, 10 February 2013 (UTC)[reply]
    Pls fix this - it has just been implemented on templates for projects that do not what this odd format....PLS FIX no need to edit wars.Moxy (talk) 20:39, 22 February 2013 (UTC)[reply]
    • Okay, I'll see what I make of the above and try to implement accordingly...
    ...So, if I've understood correctly, the (auto-created) Outline and Index links should be taken out of the "below" area and placed elsewhere, along with a new (auto-created) Bibliography link. If not "above", I'd make them group1, i.e. not the last group as in the current Template:Canada topics. CsDix (talk) 21:13, 22 February 2013 (UTC)[reply]
    ...Some reorganization needed to make group1 available (but can be done), so how about using the "above" line for these Outline · Index · Bibliography links but with styling so it doesn't look like an "above" line..? CsDix (talk) 21:21, 22 February 2013 (UTC)[reply]

    Update

    [edit]
    • Was easier in the first instance to add a line with the Outline · Index · Bibliography links just before the "below" line. I think I'd certainly prefer the "above" line or just after it, though. However, not so easy to implement quickly, as some instances of this template use the "above" line in a non-standard way (e.g. Template:French Polynesia topics). I'm intending, though, to amend such use so the Outline · Index · Bibliography links may be moved up there. (Seems more apt when two of the links – the Overview and Index – are general / introductory.) CsDix (talk) 21:54, 22 February 2013 (UTC)[reply]
    They're more indexing than introductory, the sort of thing that's usually placed at the end to consult if you didn't find what you were looking for. They're certainly less important than the actual content. Kanguole 22:16, 22 February 2013 (UTC)[reply]
    • ...Outline · Index · Bibliography now in the "above" position and I'm aware that a handful of instances may now feature some mis-formatting, etc. Will start taking a look. CsDix (talk) 22:16, 22 February 2013 (UTC)[reply]
    Ok was talking with a few people from WP:United States lets try the format on Template:United States topics - think its ok for them now as with Template:Russia topics. Any way we can use this on Template:Canada topics but at the same time leave the colors they chosen to use?Moxy (talk) 19:57, 24 February 2013 (UTC)[reply]

    United States topics

    [edit]


    CsDix (talk) 00:09, 25 February 2013 (UTC)[reply]

    Lets try it see if anyone reverts (the main 2 people that ran the project have retired recently) - lets try it on the Russia one as-well. Can we implement those Canadian colors if we swap templates?Moxy (talk) 00:13, 25 February 2013 (UTC)[reply]
    Okay, I'll copy the above to the United States topics template, then edit the Russia one directly (then don helmet?). The Canada topics template has more customization (the backgrounds and lines) than that offered by {{Country topics}}, so it's probably best left as a Navbox, but I could rearrange its contents along Country topics lines (i.e. main groups = History, Geography, Governance, Economy, Society) if that's what's desired. CsDix (talk) 00:23, 25 February 2013 (UTC)[reply]
    Lets leave the Canada one alone...very long debate to get to were they are. They seem to hate the over sized ones.Moxy (talk) 05:11, 25 February 2013 (UTC)[reply]

    Took out flag

    [edit]

    I couldn't see what the flag parameter was adding here so I took it out. Per WP:MOSICON, singular flags in infoboxes and templates aren't recommended. --John (talk) 22:43, 9 February 2013 (UTC)[reply]

    This edit broke the title, which is now split over two lines. Kanguole 00:00, 10 February 2013 (UTC)[reply]
    Thanks for fixing it. --John (talk) 00:48, 10 February 2013 (UTC)[reply]
    It's been practice for years to have the flag in the template. Please reconsider the edit, as __NOTITLEFLAG__ is capable of suppressing certain so-called "cruft"; get a consensus, that's what democratic editing is about. Needless to say, Syria is a CLEAR EXAMPLE of a country that should not have a flag at the moment, due to the civil war going on there and the use of the old flag by the opposition versus the official flag. -- 92.13.88.3 (talk) 19:20, 18 February 2013 (UTC)[reply]

    Being able to have a flag icon in the title bar of this template should be added back. It's appropriate for navboxes about countries to have them. Why?

    • Flags are allowed inside this navbox with the "|image" and "|imageleft" parameters. But they can't be seen when the navbox is collasped.
    • WP:MOSICON discussion about Flag use is about infoboxes, not navboxes. They play quite different roles in an article.
    • This exception is similar to this one at WP:MOSICON#Avoid flag icons in infoboxes: "The use of ship registry flags and International Code of Signals flags in infoboxes of ship articles is appropriate."
    • There are other exceptions for flag icon use with countries in WP:MOSICON, similar to this one.
    Lentower (talk) 22:09, 24 July 2014 (UTC)[reply]
    

    Template-protected edit request on 16 March 2014

    [edit]

    Please replace the current version of this template with this, the current sandbox version. The only substantive difference is a reduction in the gap between the two lines forming the (default) below content ([Outline · Index · Bibliography] and/or [Book · Category · Commons · Portal · WikiProject] links). (The sandbox version doesn't feature the noinclude and includeonly areas in the live version, so these need to be retained.) Thanks, Sardanaphalus (talk) 19:40, 16 March 2014 (UTC)[reply]

    done? I made some modifications, since it appears the hlist was removed from the above, and it wasn't clear why we need the plainlist. revert/ping me if there are problems. Frietjes (talk) 00:44, 18 March 2014 (UTC)[reply]
    • Thanks for attending to the request. The gap between the two default below lines still looks a little wide here, though, so I'd ask that |belowstyle = padding:0.25em;line-height:1.4em;{{{belowstyle|}}}; as in the sandbox version linked above. If I recall correctly, the amended hlist/plainlist settings allowed addtobelow to function fully (hlist seems to overrule plainlist). Sardanaphalus (talk) 21:25, 18 March 2014 (UTC)[reply]
    added, I realize that hlist currently "overrules" plainlist, but seems like a good idea to just use one class here if that works. Frietjes (talk) 21:32, 18 March 2014 (UTC)[reply]
    • Doesn't seem to've worked, I'm afraid; belowstyle seems to have no effect. After much unsuccessful experimentation in the sandbox, I've fallen back to the plainlist/hlist version (slightly amended; see sandbox history), so please use that one to update the template. Sardanaphalus (talk) 13:39, 19 March 2014 (UTC)[reply]
    seems to break the second example on the testcase page. does Template:Country topics/sandbox2 work for you? Frietjes (talk) 00:59, 20 March 2014 (UTC)[reply]
    • Thanks for sandbox2. It doesn't quite work, as I think the newline between each <div> tag and asterisk mean that the div's line-height styling is ignored. But it's an improvement on the current template's below spacing. (As I've just left it, sandbox2's operation should be unchanged, but I've added more alignment to the below section's code.) Yours, Sardanaphalus (talk) 00:01, 23 March 2014 (UTC)[reply]
    feel free to change either sandbox to get something that works. is there any particular reason why we can't just have all the below items as a single line? seems like this would eliminate all the spacing problems? Frietjes (talk) 00:15, 23 March 2014 (UTC)[reply]
    • Sandbox2 is an improvement on the current live template, so let's use that. I guess the below section has two lines as the links on the first are to other articles, while those on the second are to further afield...? Sardanaphalus (talk) 09:53, 23 March 2014 (UTC)[reply]
    [edit]

    Somehow the data supplied to the parameter country didn't get linked. This is some sort of implementation problem because allied users have their main topic (country in this case) linked. This is sort of basic in a navigational template. Thanks. Student7 (talk) 12:55, 25 June 2014 (UTC)[reply]

    @Student7: example? Frietjes (talk) 16:29, 29 June 2014 (UTC)[reply]
    I can't find one! I'll get back iff I do! Thanks. Student7 (talk) 12:26, 30 June 2014 (UTC)[reply]

    Template:Tibet topics

    [edit]

    For a strange reason the Template:Tibet topics is giving a link to Government of Tibet what redirects to Tibetan Government. But the template shows no link to "Government of Tibet". After much testing I found that the culprit is somewhere hidden behind the link "Politics" in the template. Only when that one is active, the dodgy link shows up. How on earth can I tell "Politics" not to link? The Banner talk 18:38, 13 May 2015 (UTC)[reply]

    that's the beauty of 'ifexist', it generates entries in 'what links here'. I fixed the problem in the template with a hack. Frietjes (talk) 17:14, 16 May 2015 (UTC)[reply]
    Great! Thanks for that! The Banner talk 18:52, 16 May 2015 (UTC)[reply]

    Changed "List ... Of ... Topics" to "index of Articles"

    [edit]

    I have edited this template, changing "List of (country)-related topics" to "Index of (country)-related articles" — given that most, if not all, such lists were page-moved a few years ago. Until today, this template was pointing to a redirect, which I found was playing up on a few pages. David Cannon (talk) 14:39, 12 July 2015 (UTC)[reply]

    Removal of some of the below paramaters

    [edit]

    Please could someone remove the below parameters pointing to Commons and Wikiproject. Wikiproject per WP:LINKSTYLE: "Do not create links to user, WikiProject, or draft pages in articles". As this template is visible in articles, this applies here. And Commons per Wikipedia talk:Categories, lists, and navigation templates/Archive 9#RFC: Should Sister Project links be included in Navboxes?. --Rob Sinden (talk) 15:15, 13 May 2016 (UTC)[reply]

    Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. Izno (talk) 15:36, 13 May 2016 (UTC)[reply]
    Partly done: Don't mean to override Izno here, but per reasonable RfC, I've removed links to Commons, actually. I've kept WikiProject links, because I think WP:LINKSTYLE is referring to links to WikiProjects in article prose, which this template is not. It's a navbox where I think the wikiproject might be legitimate. I'm toggling |answered= to have someone else look into deprecating WikiProject links and decide if it's appropriate. — Andy W. (talk ·ctb) 15:39, 13 May 2016 (UTC)[reply]
    Thanks. Isn't the point of WP:LINKSTYLE to avoid linking away from article namespace into WP: namespace? That's certainly how I read it. --Rob Sinden (talk) 15:43, 13 May 2016 (UTC)[reply]

    @Andy M. Wang: I was only looking to ensure I didn't break something ( :D ) after investigating that the change may not be trivial, and since Rob made the edit request...

    Regarding WikiProjects, I think WP:LINKSTYLE applies in spirit if not exact wording. We have portals for that sort of thing. --Izno (talk) 15:44, 13 May 2016 (UTC)[reply]

    I have to leave now. I can look at this again in about 2-3 hours. :) — Andy W. (talk ·ctb) 15:47, 13 May 2016 (UTC)[reply]
    Done Any concerns, please ping me. — Andy W. (talk ·ctb) 16:54, 13 May 2016 (UTC)[reply]

    headline

    [edit]

    The first line has the state name and then the wiki link to the index. Remove the wiki link to the index as there is a separate link to it at the bottom.68.151.25.115 (talk) 14:48, 8 April 2017 (UTC)[reply]

    Not done: please establish a consensus for this alteration before using the {{edit template-protected}} template. – Train2104 (t • c) 14:54, 8 April 2017 (UTC)[reply]

    Add optional law

    [edit]

    add law to sit in politics, which is quite commonly used. Viztor (talk) 09:28, 2 June 2019 (UTC)[reply]

     Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. DannyS712 (talk) 09:18, 3 June 2019 (UTC)[reply]

    WP:NAVNOREDIRECT issues & proposed fixes

    [edit]

    In some cases, the links generated by this template are redirects (e.g. "Index" on Template:United Kingdom topics and multiple group headers on Template:Gambia topics, which is suboptimal (cf. WP:NAVNOREDIRECT). I've made two changes in the sandbox (diff, test cases) to:

    I've only touched the "default" generated links for now because I didn't want to drive up the expensive parser function count too much at once. If I haven't missed anything, my changes should have increased it by 15 in the worst case, which I think is reasonable. If nobody objects, I'll open an edit request a few days from now. – Rummskartoffel (talk • contribs) 16:37, 27 May 2021 (UTC)[reply]

    Based on the United States test-case, the dash fix doesn't appear to work. Are you seeing differently? CMD (talk) 17:02, 27 May 2021 (UTC)[reply]
    I am, in fact. Could it be that you accidentally looked at the live version of the template and not the sandbox version? The top invocation is the live version, the middle is the sandbox I edited, and the third is a secondary sandbox. – Rummskartoffel (talk • contribs) 17:11, 27 May 2021 (UTC)[reply]
    Ah, perhaps I was looking at the wrong sandbox. Does appear to be working. CMD (talk) 17:19, 27 May 2021 (UTC)[reply]
    Please apply this change. See above for details. – Rummskartoffel (talk • contribs) 10:41, 30 May 2021 (UTC)[reply]
     Done * Pppery * it has begun... 18:08, 7 June 2021 (UTC)[reply]

    Too many expensive parser function calls

    [edit]

    List of Caribbean-related topics is currently showing [[Lua error: too many expensive function calls.|Politics]]. Editing the article and previewing shows: Warning: This page contains too many expensive parser function calls. It should have less than 500 calls, there are now 564 calls.

    A preview of the following from the article shows 539 expensive calls.

    {{Anguilla}}
    {{Antigua and Barbuda topics}}
    {{Aruba topics}}
    {{Barbados topics}}
    {{British Virgin Islands topics}}
    {{Cayman Islands topics}}
    {{Cuba topics}}
    {{Curaçao topics}}
    {{Dominica topics}}
    {{Dominican Republic topics}}
    {{Grenada topics}}
    {{Guadeloupe topics}}
    {{Haiti topics}}
    {{Jamaica topics}}
    {{Martinique topics}}
    {{Montserrat topics}}
    {{Puerto Rico topics}}
    {{Saint Kitts and Nevis topics}}
    {{Saint Lucia topics}}
    {{Saint Vincent and the Grenadines topics}}
    {{Trinidad and Tobago topics}}
    {{United States Virgin Islands}}
    

    It could be argued that there are too many navboxes in this article. However, I believe each is calling {{Country topics}} which has 26 occurrences of #ifexist, and I'm wondering if there is some clean way of avoiding those tests. I was thinking of an optional parameter but it would be ugly. Any ideas? G. Moore is currently working on the article. Johnuniq (talk) 02:21, 7 September 2021 (UTC)[reply]

    I noticed this and couldn't figure out why it is occurring. This article is an Outline of the Caribbean. It helps to have all the topics for the Caribbean and Caribbean countries in one place because there is a lot of overlap. I looked at some other Outlines of regions like South America and Asia, which also have lots of templates but they use the individual Geography of, Politics of, History of, etc. templates. Talk to G Moore 03:31, 7 September 2021 (UTC)[reply]
    A bunch of expensive function calls also come from Module:Redirect, 11 invocations to which I added in June (see section just above this one), but there's an unapplied change sitting around in its sandbox that would remove those calls and bring the article down to 445 expensive functions. I'll go file an edit request there. – Rummskartoffel 11:08, 7 September 2021 (UTC)[reply]
    I have put most of the template content into links to the countries and only use a few templates at the bottom of the page. No longer get the lua error. -- Talk to G Moore 18:43, 8 September 2021 (UTC)[reply]
    [edit]

    Change –related (en dash) to -related (hyphen). (Revert User:GoldRingChip's edit and User: Paine Ellsworth's edit.) All 'Index of Country name–related articles' pages have the redirect 'Index of Country name-related articles.' But 'Index of Country-related articles' is not likely to have the redirect 'Index of Country–related articles.' Sawol (talk) 17:42, 13 November 2021 (UTC)[reply]

    It appears those were edited in accordance with MOS:SUFFIXDASH. Can you show some examples? P.I. Ellsworth - ed. put'r there 20:19, 13 November 2021 (UTC)[reply]
    I agree with Paine Ellsworth that the dash form is probably correct in many cases. Some links to example usages in articles or other pages would be helpful for determining if the dash is being applied correctly. I am marking this request as answered for now, since there is no immediate edit to make. – Jonesey95 (talk) 21:06, 13 November 2021 (UTC)[reply]
    e.g Template:Haiti topics. 'Haiti-related' (hyphen) is the compound of Haiti and related. 'United States–related' (en dash) is the compound of United States and related. Sawol (talk) 12:35, 14 November 2021 (UTC)[reply]
    I am unable to find the string "related" at Template:Haiti topics, either in the wikitext or the rendered page. Where does "Haiti-related" (or "Haiti–related") appear? – Jonesey95 (talk) 14:31, 14 November 2021 (UTC)[reply]
    There is supposed to be a link at the bottom of the template, next to the "Outline" link, with link text "Index", linking to Index of Haiti-related articles (with a hyphen-minus). But because of the edit this ER is talking about, it only displays that link if Index of Haiti–related articles (with an en dash) exists. You can see what it's supposed to look like by editing {{Haiti topics}} to replace {{Country topics at the top with {{Country topics/sandbox and previewing. Rummskartoffel 16:45, 14 November 2021 (UTC)[reply]
    It would help to get a handle on the scope of this. We might be able to create redirects, as I have done with the above index, to resolve this. P.I. Ellsworth - ed. put'r there 03:36, 15 November 2021 (UTC)[reply]
    Per WP:NAVNOREDIRECT, redirects would be suboptimal, though I guess we could just slap {{#invoke:redirect|main|fulltext=y|<title goes here>}} on every single one. But I don't understand why the part of the template that generates the "Index" link was changed to begin with (GoldRingChip, could you clarify?); after my edit earlier this year (see above), it was already supposed to always select the correct title automatically. Rummskartoffel 14:30, 15 November 2021 (UTC)[reply]
    @Rummskartoffel: The ndash vs hyphen debate ought to be settled. I modified the template to use ndash. —GoldRingChip 14:34, 15 November 2021 (UTC)[reply]
    But the template already used en dashes before your edit, if the article title was using an en dash. Unless I'm missing something, the only thing I can see your edit achieved is that the template now fails to link to the article if it doesn't use an en dash, as was the case with {{Haiti topics}} before Paine Ellsworth created the redirect Index of Haiti–related articles. Rummskartoffel 17:30, 15 November 2021 (UTC)[reply]
    @Rummskartoffel: I see what you mean, and I'm sorry for the confusion. I've reverted. —GoldRingChip 19:30, 15 November 2021 (UTC)[reply]

    To editor Sawol:  done. My edits have also been reverted, so this request has been granted. P.I. Ellsworth - ed. put'r there 20:11, 15 November 2021 (UTC)[reply]

    After that revert, I believe the second and third checks for the index article are now identical, so the third one should be removed. The comments in that part of the source code should also be changed, since they refer to checking for articles containing en dashes, which is now not being done any more. Rummskartoffel 20:47, 15 November 2021 (UTC)[reply]
    This is similar to a recent discussion on categories, where there was no consensus to follow the usual rule of MOS:SUFFIXDASH for "-related lists". I documented this on the MOS page here, and tried to draw attention on the talk page here.
    A further brief discussion here made no progress.
    I think it would be an improvement to gain consensus that "-related" always uses a hyphen rather than a dash, in both articles and category names. – Fayenatic London 23:33, 15 November 2021 (UTC)[reply]
    I haven't looked at the code in detail, but it seems that we should be able to check for a space between two letters in the country name, and if it is present, apply a dash instead of a hyphen. That should get us "Turks and Caicos–related" and "France-related" with one code fragment. – Jonesey95 (talk) 01:14, 16 November 2021 (UTC)[reply]
    According to the very first comment in this thread, [a]ll 'Index of Country name–related articles' pages have the redirect 'Index of Country name-related articles'. Because of WP:NAVNOREDIRECT, this template already uses Module:Redirect to bypass redirects and directly link to the actual title of the index article. This means no fancy logic will be necessary. Rummskartoffel 22:35, 16 November 2021 (UTC)[reply]
    To editor Rummskartoffel: yes, it looks like I replaced two too many endashes with hyphens. So that third check, which is actually for endashed indexes, has been restored to its previous condition. Thank you for the good catch! P.I. Ellsworth - ed. put'r there 08:56, 21 November 2021 (UTC)[reply]

    What is the purpose of all the different options for the "name" parameter?

    [edit]

    I've just answered a question about a template issue at the teahouse caused by this parameter, and looking at the template I don't see why this parameter is set up the way it is. At the moment the template contains the code:

    |name = {{if empty|{{{template_name|}}}| {{#if:{{{country|{{{territory|{{{region|{{{titlename|}}}}}}}}}}}}| {{{country|{{{territory|{{{region|{{{titlename}}}}}}}}}}}} topics}} | {{FULLPAGENAME}} }}

    What is the point of this, and what advantage does it have over:

    |name = {{PAGENAME}} 

    ? The name parameter is used to set the target of the "V • T • E" links at the top of the navbox, it should never be set to something other than the page name of the template. The current setup of correctly getting the template name (though with unnecessary namespace), then overriding it with a guess if other parameters are present, then providing a parameter to override the guess and put it back to the correct value when it goes wrong just seems unnecessarily confusing. 192.76.8.85 (talk) 23:22, 2 July 2022 (UTC)[reply]

    [edit]

    The template should not blindly add links to "Outline" and "Index" as this is sometimes a problem, in particular, when one redirects to the other. For an example, see {{Brazil topics}}, where Index of Brazil-related articles redirects to Outline of Brazil. Redirects can be detected using {{#invoke:redirect|isRedirect|...}}, so, for example, {{#invoke:redirect|isRedirect|Index of Brazil-related articles}} = "yes", and in this case, it should only display one link (the non-redirect). Mathglot (talk) 22:47, 25 February 2023 (UTC)[reply]