Template talk:Infobox political party
![]() | Template:Infobox political party is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the talk page for discussing improvements to the Infobox political party template. |
|
Archives: 1, 2Auto-archiving period: 3 months ![]() |
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||
|
![]() | This template was considered for deletion on 24 December 2020. The result of the discussion was "speedy withdraw". |
Edit request to complete TfD nomination
[edit]![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Template:Infobox political party has been listed at Templates for discussion (nomination), but it was protected, so it could not be tagged. Please add:
{{subst:tfm|help=off|type=sidebar|1=Infobox US political party}}
to the top of the page to complete the nomination. Thank you. A1Cafel (talk) 07:27, 25 December 2024 (UTC)
Edit request to implement TfD consensus
[edit]![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Recently, a TfD was completed regarding this template which resulted in a general consensus to edit part of this template. The edits were made, but they were removed because they were breaking the template on some pages.
I believe I have fixed the issue (which, to be honest, I could not replicate in my sandbox), and I was wondering if someone could implement the following changes:
- Please replace the |abovestyle and |above sections with this:
| abovestyle = font-size: 125%; {{#if:{{{background|}}}|background:{{{colorcode}}}; color:{{{textcolorcode|}}};|}}
| above = <div style="padding-top:0.3em; padding-bottom:0.3em; {{#if:{{{colorcode|}}}|border-top:2px solid {{{colorcode}}}; border-bottom:2px solid {{{colorcode}}};}} line-height: 1;"><div class="fn org">{{if empty|{{{name|}}}|{{PAGENAMEBASE}}}}</div> {{#if:{{{native_name|}}} |<div style="font-size: 0.8em; padding-top:0.3em;" class="nickname" {{#if:{{{native_name_lang|}}}|lang="{{{native_name_lang}}}"}}>{{{native_name}}}</div>}}</div> - Please add
background
andtextcolorcode
to the parameter list at the end of the template.
Thanks! Please let me know if there are any issues. RiverMan18 (talk) 21:43, 3 February 2025 (UTC)
Not done for now: editor RiverMan18, this has been [sandboxed] – looking at the [testcases] page, in "Test 2" the red line below the name and native name is missing. The new parameters are used in "test 3". Is all this what you want and expect? Test 2 looks odd now. P.I. Ellsworth , ed. put'er there 03:31, 4 February 2025 (UTC)
- @Paine Ellsworth I think I fixed it in the sandbox (it was a missing space). This explains the problem that was reported when the change was originally implemented—thank you (I’m not sure why it didn’t show up in my sandbox—I might have used a different code).
- Thank you. RiverMan18 (talk) 13:57, 4 February 2025 (UTC)
- My pleasure, and
completed. P.I. Ellsworth , ed. put'er there 15:38, 4 February 2025 (UTC)
- Ok—thank you! RiverMan18 (talk) 15:39, 4 February 2025 (UTC)
- My pleasure, and
- A colored background, makes it more difficult to read the name of the political party. GoodDay (talk) 21:04, 4 February 2025 (UTC)
- This code also appears to have at least two problems: I think
{{#if:{{{background|}}}|background:{{{colorcode}}}
should be{{#if:{{{background|}}}|background:{{{background}}}
, and there needs to be a default color fortextcolorcode
, even if it is justinherit
orblack
, in order to avoid the Linter "background color without color" error. I could be reading the code wrong, but I'm pretty sure both changes need to be made. – Jonesey95 (talk) 01:17, 6 February 2025 (UTC)- I agree with you on the
textcolorcode
thing, but I’m not sure about thebackground
thing—the current code sets thecolorcode
value as the background if there is one, which results in people not having to put the party color in twice. Right now,background
, if it has a value, just enables the background. - I’d be ok with the
background
change—it would just be more inconvenient. RiverMan18 (talk) 01:33, 6 February 2025 (UTC) - I agree that the new
|textcolorcode=
parameter needs the black text default. As for changing the|background=
parameter, I'm not sure I agree. The|colorcode=
parameter already exists and is the political party's color. Right now all that's needed is|background=yes
or even|background=y
. Changing it from colorcode would mean having to enter the party's color again – I think unnecessarily. P.I. Ellsworth , ed. put'er there 02:41, 6 February 2025 (UTC)
- I agree with you on the
- The
|textcolorcode=
parameter can be used to make the name of the political party easy to read. Just use a highly contrasting color, like white text on black or red. P.I. Ellsworth , ed. put'er there 02:41, 6 February 2025 (UTC)
- This code also appears to have at least two problems: I think