Template:P1
From PCSAR
This is the documentation for the template Template:P1
The template [edit] Pn
The templates
They are typically used in other templates when there are several values
that can be returned, one of which is the named parameter.
Whether to use
E.g. {{ {{#if: {{{1|}}} | P1 | P2 }} |{{{1}}}|{{{2|}}}}} returns parameter 1 if it's non blank, otherwise parameter 2. This usage might be chosen because the following more straight forward implementation would have the undesired side effect of stripping whitespace from the beginning and end of parameters 1 and 2 (a side effect of #if:). {{#if: {{{1|}}} | {{{1}}} | {{{2|}}} }} |
To see how this template is implemented,
edit this page and examine the portion
between <includeonly>
and </includeonly>
.