Difference between revisions of "Template:Infobox election/shortname"
Jump to navigation
Jump to search
Template>MusikAnimal m (Protected "Template:Infobox election/shortname": Highly visible template; 10,000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | {{# | + | {{#if:{{{name|}}} |
− | | | + | |{{#ifeq:{{{link}}}|no |
− | | | + | |{{{name}}} |
− | + | |{{#ifeq:{{delink|{{{name}}}|wikilinks=target}}|{{{name}}} | |
+ | |{{#switch:{{{name}}} | ||
+ | | Independent | Independents = [[Independent politician|{{{name}}}]] | ||
+ | | Other | Others = Others | ||
+ | | [[{{{name}}}|{{#invoke:Political party|fetch|{{{name}}}|shortname}}]] | ||
+ | }} | ||
|{{{name}}} | |{{{name}}} | ||
− | + | }} | |
− | + | }} | |
− | |||
− | |||
− | |||
}}<noinclude> | }}<noinclude> | ||
{{documentation|content= | {{documentation|content= |
Latest revision as of 20:16, 30 January 2022
Template documentation
This 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, if the corresponding {{{{{name}}}/meta/shortname}}
template exists, it returns [[{{{name}}}|shortname]]
where shortname
is the output of the {{{{{name}}}/meta/shortname}}
template. If this template does not exist, it returns the value of name
verbatim.