Template:Infobox election/shortname: Difference between revisions
Content deleted Content added
+ |
Reduce WP:PEIS |
||
Line 1: | Line 1: | ||
{{# |
{{#ifeq:{{{link}}}|no |
||
|{{ |
|{{{name|}}} |
||
⚫ | |||
|{{{name}}} |
|||
⚫ | |||
|{{#switch:{{{name}}} |
|{{#switch:{{{name}}} |
||
| Independent | Independents = [[Independent politician|{{{name}}}]] |
| Independent | Independents = [[Independent politician|{{{name}}}]] |
||
Line 12: | Line 11: | ||
| [[{{{name}}}|{{#invoke:Political party|fetch|{{{name}}}|shortname}}]] |
| [[{{{name}}}|{{#invoke:Political party|fetch|{{{name}}}|shortname}}]] |
||
}} |
}} |
||
|{{{name}}} |
|{{{name|}}} |
||
}} |
}} |
||
}} |
|||
}}<noinclude> |
}}<noinclude> |
||
{{documentation}}</noinclude> |
{{documentation}}</noinclude> |
Revision as of 17:41, 15 March 2024
This template is used on approximately 30,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses Lua: |
Template:Infobox election/shortname is a subtemplate of {{Infobox election}}, it should not be used directly.
Purpose
This subtemplate takes two inputs, name
and link
. If link is set to no
, then it returns the value of name
verbatim. Otherwise, it returns [[{{{name}}}|shortname]]
where shortname
is the output of the political party module. If the shortname does not exist in the module, it returns the value of name
verbatim.