Template talk:Game update icon

From Guild Wars 2 Wiki
Jump to navigationJump to search

Redirects[edit]

When this template (and I assume {{skill icon}} and {{trait icon}} do this too) calls a redirect, it will automatically pull the name and icon from the redirected-to page. This is a good feature, but it's causing problems in the cases of skills and traits that have been replaced with updated versions. Case in point: Take a look at what happens to the link for Peripheral Vision (which was recently replaced by Premeditation) on Game updates/2018-05-08#Traits. I see two solutions: comb through every skill and trait that's been renamed in this manner and split them into separate articles, or tweak the template so it doesn't rename redirects anymore. --Idris (talk) 15:37, 10 May 2018 (UTC)

Okay, Premeditation has now been split into two articles, fixing the problem for that particular example. But before the split, Peripheral Vision's entry looked like this:
Premeditation.png Premeditation: This trait has been replaced with Premeditation.
There are still other traits that have this issue, and it's likely to crop up again in the future. --Idris (talk) 15:44, 10 May 2018 (UTC)
Here's a solution: main template, result format template. The things I added are:
For the main template: | userparam = {{{1|}}}
For the result template, I replaced the link text with {{#if:{{#pos:{{{4}}}|{{{#userparam}}}}}|{{{4}}}|{{trim|{{#explode:{{{#userparam}}}|(}}}}}}.
I added a check if the ?Has canonical name property can be found in the given parameter ({{game update icon|Nourishing Rot}}. If it can be found, the ?Has canonical name property will be used for the link text; else, the parameter will be used. —Nefastu 16:06, 10 May 2018 (UTC)
Implemented my solution—if anything major breaks due to my changes, feel free to revert. —Nefastu 16:12, 10 May 2018 (UTC)
Looks good to me. Thanks for the fix! --Idris (talk) 16:16, 10 May 2018 (UTC)

It doesn't seem to be working on certain cases. A possibility would be adding an extra parameter to put the original name when traits and skills get renamed. Mith🌟Talk 17:00, 23 April 2019 (UTC)

Purpose[edit]

I’ve seen this template being used on game update pages instead of {{Skill icon}}. What is the reason for this? Visually, this makes the lines in the game update notes even higher, further disrupting the change list when this is used next to non-skill changes. So why is this being used instead? What is the benefit here? I think we should also clarify this in the template description. poke | talk 18:51, 23 March 2024 (UTC)