Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a44f574f1e9bdbb4

Jump to content

Template talk:Canadian election result

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Canadian election result/source)
Latest comment: 2 months ago by Paine Ellsworth in topic Edit request 30 July 2026

seeking guidance

[edit]

Can someone explain why Template:2017 Vancouver municipal by-election/City Council had to be moved to Template:2017 Vancouver municipal by-elections/City Council (with the s tacked on to "by-election") to work properly when transcluded into 2017 Vancouver municipal by-election?

When the template was at Template:2017 Vancouver municipal by-election/City Council and was transcluded using:

{{2017 Vancouver municipal by-election/City Council}}

it failed to generate the v/t/e links in the table. Using the plural "by-electionS" seems to have fixed the issue but I'd love to know why since the article title does not have the s. —Joeyconnick (talk) 05:23, 17 March 2025 (UTC)Reply

The /top template code has this code to build the navbar:
{{#ifeq:{{{by}}}|yes|by-|}}election{{#ifeq:{{{by}}}|yes|s|}}}}
Don't ask me why. – Jonesey95 (talk) 13:40, 19 March 2025 (UTC)Reply
Thanks for your response! I'm not a template editor... any chance we can fix this? Basically every time this template is transcluded, it should always generate v/t/e links. There's no case where those should ever fail to be present.
The same problem is present 4 times in 2018 Vancouver municipal election, as well. —Joeyconnick (talk) 02:58, 27 March 2025 (UTC)Reply

Edit request 2 May 2025

[edit]

Please add dark mode compatible design tokens to the following subpages. Current styling forces static white background with black text.

SubpageSandbox Diff
Template:Canadian_election_result/totalSpecial:Diff/1288460355
Template:Canadian_election_result/gainSpecial:Diff/1288462452
Template:Canadian_election_result/holdSpecial:Diff/1288463117

Thanks ⇌ Synpath 20:28, 2 May 2025 (UTC)Reply

Synpath, is there a testcases page where I can see the difference in output? – Jonesey95 (talk) 20:50, 2 May 2025 (UTC)Reply
Yes, see Template:Canadian election result/testcases. ⇌ Synpath 20:53, 2 May 2025 (UTC)Reply
Thanks. An improvement. I have implemented the change for the /total template. For Template:Canadian election result/gain, it looks like there are too many changes from the live template to the sandbox. Can you please sync the live template to the sandbox and then apply only the changes that you want in this revision? Same request with Canadian election result/hold. – Jonesey95 (talk) 21:42, 2 May 2025 (UTC)Reply
I missed that they weren't identical, and I didn't know ComparePages existed, very useful. The diff after syncing for /gain is Special:Diff/1288480154 and for /hold Special:Diff/1288480259/1288480628. ⇌ Synpath 22:52, 2 May 2025 (UTC)Reply
Thanks.  Done. – Jonesey95 (talk) 12:22, 3 May 2025 (UTC)Reply
[edit]

It was hard to find an explanation online for "notional hold/gain" described by this template. Could we have it link to Notional election results for clarity? (Also, that article could probably use a Canada-specific section, especially if this is used by Canadian media and wikipedia articles about Canadian elections.) Rxtreme (talk) 23:16, 1 April 2026 (UTC)Reply

Good idea. I've added a link to Notional election results in the template.-- Earl Andrew - talk 14:54, 2 April 2026 (UTC)Reply

Edit request 30 July 2026

[edit]

Description of suggested change:

Add a parameter to {{Canadian election result/top}} that adds the text (or before) to the "The #### election will be held on" text when the on parameter is set to yes, for elections where the writ has not yet been issued. The text would display: "The #### election will be held on or before"

Diff:

−
''The <!-- -->{{#if:{{{by|}}}|by-|{{{election|{{{2}}}}}} {{#switch:{{{jurisdiction|{{{1}}}}}}||CA|AB|BC|MB|NB|NF|NL|NS|NT|NU|ON|PE|QC|SK|YK|YT=general  |MTL|OTT|TOR|VAN=municipal  |=}}}}<!-- -->election will be held on <!-- -->{{#time:F j|{{{on|}}}}}<!-- -->{{#if:{{{by|}}}|, {{#time:Y|{{{on|}}}}}}}.''
+
''The <!-- -->{{#if:{{{by|}}}|by-|{{{election|{{{2}}}}}} {{#switch:{{{jurisdiction|{{{1}}}}}}||CA|AB|BC|MB|NB|NF|NL|NS|NT|NU|ON|PE|QC|SK|YK|YT=general  |MTL|OTT|TOR|VAN=municipal  |=}}}}<!-- -->election will be held on {{#if:{{{pending|}}}|or before }} <!-- -->{{#time:F j|{{{on|}}}}}<!-- -->{{#if:{{{by|}}}|, {{#time:Y|{{{on|}}}}}}}.''

RedBlueGreen93 23:03, 30 July 2026 (UTC)Reply

 Completed. P.I. Ellsworth , ed. – welcome! – 17:07, 31 July 2026 (UTC)Reply