From WikiHealth

Help:Snippet Parameters

Related Topics
Sponsor Links

Snippet parameters are either named or numbered. The syntax is

{{snippetname|parname1=parvalue1|parname2=parvalue2}}

with {{{parname}}} tags in the snippet, or

{{snippetname|parvalue1|parvalue2}}

with {{{1}}}, {{{2}}}, etc. tags in the snippet. (Note that parameter tags in the snippet have three braces rather than two.)

Thus the snippet mechanism involves two kinds of replacements:

  • Snippet calls (double braced) are replaced by snippet content
  • parameters (triple braced) are replaced by parameter values


A parameter value can contain a piped link; the "|" in such a link is not taken as parameter separator.

   Example: "{{t|[[a|b]]}}" returns "Template:T".

On rendering, surplus parameter values (including named parameters that do not occur in the snipppet) are ignored: "{{t|a|b}}" gives Template:T.

If a parameter is left undefined, the name of the parameter, with the braces, will be returned.

"{{t2}}" produces Template:T2

Thus, the default value in the code {{{parameter number or name}}}, and the rendered text on the page itself will be one and the same.

To avoid this one may want to specify the parameter anyway like

"{{hc|langs=}}, {{hc|langs=-}}, and {{hc|langs='''N.A.'''}}"
Page Statistics
  • This page was originally created by WikiHealth Admin at 11:52 on February 9, 2012.
  • This page was last modified by An Anonymous User at 04:13 on April 23, 2005.
  • This following users have made contributions: WikiHealth AdminE-mail this user, and an anonymous user.
  • This page has been previously accessed a total of 750 times.
 
Log in / create account
User