Template talk:Fractal info

From Guild Wars 2 Wiki
Jump to navigationJump to search

Whitespace[edit]

The problem was that recently the property Has achievement page set by {{Achievement table row}} via the parameter page started to break on the following input: page=<pagename>#<section>. Why, no idea, but in order to fix it I introduced the new property Has achievement page section and we are now setting Has achievement page to <pagename> and Has achievement page section to <section>. The way how to split the <pagename> and the <section> is using {{#explode:{{{page}}}|#|0}} and {{#explode:{{{page|}}}|#|1}} which also triggered on &#32;, resulting e.g. in Has achievement page "Volcanic&" and Has achievement page section "32;Fractal". See also Template talk:Achievement table row#New parameter section

Now I excluded the &# case in the achievement table row template, i.e. this template is fine (maybe I should have done this immediately). --Tolkyria (talk) 08:33, 10 June 2020 (UTC)

Okay, I have to row back a bit. For the parameter page from the template {{Achievement table row}} html number entities should still be avoided as they are a potential source of smw errors (simply by excluding them from the exploding case, the smw error may still occur). Since this template is used on Daily Fractals, it would be appreciated to add the necessary whitespace with {{#if:}} Fractal (Edit: Nevermind, this doesn't work) instead of &#32;Fractal (since the template output will also be linked, <nowiki/> Fractal is not applicable). --Tolkyria (talk) 09:47, 10 June 2020 (UTC)
Nevermind, the {{#if:}} Fractal never worked. Now I added the whitespace for both options, with and without the suffix "Fractal", {{trim}}med it afterwards to remove the unnecessary whitespace when there is no suffix "Fractal". --Tolkyria (talk) 10:29, 11 June 2020 (UTC)
Oh now i understand why You changed it. I initially thought you had mistaken &#32; for being # (&#35;) as i read your comment (..., "#" (e.g. "&#32;") is used in [[Template:Achievement table row]] to split "page = <page name>#<section>") as meaning that the code mentioned would be an example for a way to produce a # character and then couldn't make any sense of the rest as the template isn't producing any # character but a space instead. At least that i thought it would do but if You and the Has achievement page propperty see that otherwise i won't argue. After all You can tell that better than i can. I mean; i didn't even notice anything breaking in the first place. Luckily there's You though. Nightsky (talk) 04:02, 12 June 2020 (UTC)