Jump to content

Module talk:Political party/uses

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gonnym (talk | contribs) at 11:52, 28 October 2021 (Infoboxes and templates). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This lists current uses of /shortname, /color, and /abbrev templates.

Infoboxes and templates

Template shortname color abbrev Notes Current code New code
{{Infobox election}} Yes via {{Infobox election/shortname}} {{#switch:{{{name|}}} |Other|other|={{{name|}}} |#default= {{#ifeq:{{{link}}}|no |{{{name}}} |{{#ifexist:Template:{{{name}}}/meta/shortname |[[{{{name}}}|{{Template: {{{name}}}/meta/shortname}}]] |{{{name}}} }} }} }} {{#invoke:Political party|fetch|{{{name|}}}|shortname}} - return the name given if no value
Yes via {{Infobox election/row}} {{#if: {{{color1|}}} | border-bottom: 6px solid #{{{color1}}} | {{#ifeq: {{{party_color}}} | no | | {{#if: {{{party1|}}} | {{#ifexist:Template:{{#invoke:delink|delink|wikilinks=target|1={{#invoke:string|replace|source={{{party1}}}|pattern=^(%[%[%s*[^%]%[]*%]%]).*$|replace=%1|plain=false}}}}/meta/color | border-bottom: 6px solid {{Template:{{#invoke:delink|delink|wikilinks=target|1={{#invoke:string|replace|source={{{party1}}}|pattern=^(%[%[%s*[^%]%[]*%]%]).*$|replace=%1|plain=false}}}}/meta/color}} }} }} }} }}" {{#if: {{{color1|}}} | border-bottom: 6px solid #{{{color1}}} | {{#ifeq: {{{party_color}}} | no | | {{#if: {{{party1|}}} | {{#if: {{#invoke:Political party|fetch|{{#invoke:delink|delink|wikilinks=target|1={{#invoke:string|replace|source={{{party1}}}|pattern=^(%[%[%s*[^%]%[]*%]%]).*$|replace=%1|plain=false}}}}|color}} | border-bottom: 6px solid {{#invoke:Political party|fetch|{{#invoke:delink|delink|wikilinks=target|1={{#invoke:string|replace|source={{{party1}}}|pattern=^(%[%[%s*[^%]%[]*%]%]).*$|replace=%1|plain=false}}}}|color}}; }} }} }} }}" - no default value used
{{Infobox legislative election}} Yes via {{Infobox election/shortname}} See above See above
Yes via {{Infobox legislative election/row}} {{#if: {{{colour|}}} | border-left: 4px solid {{{colour}}}; | {{#ifexist:Template:{{#invoke:delink|delink|wikilinks=target|1={{#invoke:string|replace|source={{{party}}}|pattern=^(%[%[%s*[^%]%[]*%]%]).*$|replace=%1|plain=false}}}}/meta/color | border-left: 4px solid {{ {{#invoke:delink|delink|wikilinks=target|1={{#invoke:string|replace|source={{{party}}}|pattern=^(%[%[%s*[^%]%[]*%]%]).*$|replace=%1|plain=false}}}}/meta/color}}; }} }} {{#if: {{{colour|}}} | border-left: 4px solid {{{colour}}}; | {{#if {{#invoke:Political party|fetch|{{#invoke:delink|delink|wikilinks=target|1={{#invoke:string|replace|source={{{party}}}|pattern=^(%[%[%s*[^%]%[]*%]%]).*$|replace=%1|plain=false}}}}|color}} | border-left: 4px solid {{#invoke:Political party|fetch{{#invoke:delink|delink|wikilinks=target|1={{#invoke:string|replace|source={{{party}}}|pattern=^(%[%[%s*[^%]%[]*%]%]).*$|replace=%1|plain=false}}}}|color}}; }} }} - no default value used
{{Compact election box}} Yes Yes Yes
{{Compact election box no change}} Yes Yes Yes
{{Election box candidate for alliance}} Yes Yes
{{Election box candidate no party link no change}} Yes Yes
{{Election box candidate with party link}} Yes Yes
{{Election box gain}} Yes Yes
{{Election box gain no swing}} Yes Yes
{{Election box gain with party link}} Yes Yes
{{Election box gain with party link no swing}} Yes Yes
{{Election box gain with party link no change}} Yes Yes
{{Election box gain with party link without swing}} Yes Yes
{{Election box gain with party link and percentage}} Yes Yes
{{Election box gain with party link and swing no change}} Yes Yes
{{Election box hold with party link}} Yes Yes
{{Election box hold with party link no change}} Yes Yes
{{Election box hold with party link no swing}} Yes Yes
{{Election box metadata}} Yes Yes Not entirely sure what this is
{{Election box new seat win}} Yes Yes
{{Election box new boundary win}} Yes Yes
{{Election summary party}} Yes Yes
{{Election winner list with party link}} Yes Yes
{{Political party list}} Yes Yes
{{UKPP}} Yes Yes
{{Officeholder table}} Yes Yes Yes

and lots more in Category:Election and referendum infobox templates.

Modules

Infobox/template shortname color abbrev Notes
Module:Election results Yes

Other uses

color

Possible uses

Templates where it could be added

Infobox/template Suggested addition Notes
{{Infobox political party}} color Currently colorcode has to be entered manually. Could automatically look up a colorcode that matches the article title and override that with a manually entered one.