Difference between revisions of "Template:Infobox election/shortname"
Jump to navigation
Jump to search
Template documentation
imported>Frietjes m (Frietjes moved page Template:Infobox election/party to Template:Infobox election/shortname) |
imported>Frietjes |
||
| Line 1: | Line 1: | ||
{{#ifeq:{{{link}}}|no | {{#ifeq:{{{link}}}|no | ||
| − | |{{{ | + | |{{{name}}} |
| − | |{{#ifexist:Template:{{{ | + | |{{#ifexist:Template:{{{name}}}/meta/shortname |
| − | |[[{{{ | + | |[[{{{name}}}|{{Template: {{{name}}}/meta/shortname}}]] |
| − | |{{{ | + | |{{{name}}} |
}} | }} | ||
}}<noinclude> | }}<noinclude> | ||
| Line 10: | Line 10: | ||
== Purpose == | == Purpose == | ||
| − | This subtemplate takes two inputs, <code>party</code> and <code>link</code>. If link is set to <code>no</code>, then it returns the value of <code>party</code> verbatim. Otherwise, if the corresponding {{tld|{{{ | + | This subtemplate takes two inputs, <code>party</code> and <code>link</code>. If link is set to <code>no</code>, then it returns the value of <code>party</code> verbatim. Otherwise, if the corresponding {{tld|{{{name}}}/meta/shortname}} template exists, it returns <code><nowiki>[[{{{name}}}|shortname]]</nowiki></code> where <code>shortname</code> is the output of the {{tld|{{{name}}}/meta/shortname}} template. If this template does not exist, it returns the value of <code>party</code> verbatim. |
}}</noinclude> | }}</noinclude> | ||
Revision as of 00:15, 18 October 2014
{{{name}}}
This is a subtemplate of {{Infobox election}}, it should not be used directly.
Purpose
This subtemplate takes two inputs, party and link. If link is set to no, then it returns the value of party 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 party verbatim.
| Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |