Template:Infobox election/shortname: Difference between revisions
Appearance
Content deleted Content added
MusikAnimal (talk | contribs) m Protected "Template:Infobox election/shortname": Highly visible template; 10,000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) |
convert to module use, update /doc Tag: Reverted |
||
Line 4: | Line 4: | ||
{{#ifeq:{{{link}}}|no |
{{#ifeq:{{{link}}}|no |
||
|{{{name}}} |
|{{{name}}} |
||
|{{# |
|[[{{{name}}}|{{#invoke:Political party|fetch|{{{name}}}|shortname}}]] |
||
|[[{{{name}}}|{{Template: {{{name}}}/meta/shortname}}]] |
|||
|{{{name}}} |
|||
}} |
|||
}} |
}} |
||
}}<noinclude> |
}}<noinclude> |
||
Line 14: | Line 11: | ||
== 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> |
Revision as of 12:52, 25 November 2021
![](http://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
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.