Template:Infobox election/shortname: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
(Created page with "{{#switch:{{{name|}}} |Other|other|={{{name|}}} |#default= {{#ifeq:{{{link}}}|no |{{{name}}} |{{#ifexist:Template:{{{name}}}/meta/shortname |{{{name}}}|{{...")
 
No edit summary
 
Line 15: Line 15:
== 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, 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>name</code> verbatim.  
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, 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>name</code> verbatim.  
}}</noinclude>
}}</noinclude><noinclude>[[Category: Infobox templates]][[Category: Politics templates]]</noinclude>

Latest revision as of 02:34, 12 January 2020

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 Template:Tld template exists, it returns [[{{{name}}}|shortname]] where shortname is the output of the Template:Tld template. If this template does not exist, it returns the value of name verbatim.