Difference between revisions of "Template:Infobox election/shortname"

From blackwiki
Jump to navigation Jump to search
imported>Frietjes
imported>Frietjes
(do nothing if name is blank)
Line 1: Line 1:
{{#ifeq:{{{link}}}|no
+
{{#if:{{{name|}}}
  |{{{name}}}
+
   |{{#ifeq:{{{link}}}|no
   |{{#ifexist:Template:{{{name}}}/meta/shortname
 
    |[[{{{name}}}|{{Template: {{{name}}}/meta/shortname}}]]
 
 
     |{{{name}}}
 
     |{{{name}}}
  }}
+
    |{{#ifexist:Template:{{{name}}}/meta/shortname
 +
      |[[{{{name}}}|{{Template: {{{name}}}/meta/shortname}}]]
 +
      |{{{name}}}
 +
      }}
 +
  }}
 
}}<noinclude>
 
}}<noinclude>
 
{{documentation|content=
 
{{documentation|content=

Revision as of 01:04, 16 April 2015

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.