Template:Infobox election/shortname: Difference between revisions
Jump to navigation
Jump to search
m (1 revision imported) |
m (Updated properly... uhm, hopefully.) |
||
Line 1: | Line 1: | ||
{{# | {{#if:{{{name|}}} | ||
| | |{{#ifeq:{{{link}}}|no | ||
| | |{{{name}}} | ||
|{{#ifeq:{{delink|{{{name}}}|wikilinks=target}}|{{{name}}} | |||
|{{#switch:{{{name}}} | |||
| Independent | Independents = {{wp|Independent politician|{{{name}}}}} | |||
| Other | Others = Others | |||
| [[{{{name}}}|{{#invoke:Political party|fetch|{{{name}}}|shortname}}]] | |||
}} | |||
|{{{name}}} | |{{{name}}} | ||
}} | |||
}} | |||
}}<noinclude> | }}<noinclude> | ||
{{documentation|content= | {{documentation|content= | ||
Line 14: | Line 16: | ||
== Purpose == | == Purpose == | ||
This subtemplate takes two inputs, <code>name</code> and <code>link</code>. If link is set to <code>no</code>, then it returns the value of <code>name</code> verbatim. Otherwise | This subtemplate takes two inputs, <code>name</code> and <code>link</code>. If link is set to <code>no</code>, then it returns the value of <code>name</code> verbatim. Otherwise, it returns <code><nowiki>[[{{{name}}}|shortname]]</nowiki></code> where <code>shortname</code> is the output of the [[Module:Political party|political party]] module. If the shortname does not exist in the module, it returns the value of <code>name</code> verbatim. | ||
}}</noinclude> | }}</noinclude> |
Latest revision as of 19:32, 28 October 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, 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.