Formula:Fsnp/doc

E Vicipaedia

Haec est subpagina documentationis de "Formula:Fsnp".

Haec subpagina informationes categoriasque et alias res continet quae in pagina principali respectiva non continentur.

Hanc paginam, in spatio Formulae nominali, oportet Latine convertere.

This is the template link with substitution and parameters (or {{fsnp}}) template.

It can be used in documentation and talk page discussions to show how a substituted template name would be used in code.

Here is how this template looks. Code to the left and actual rendering to the right:

{{fsnp|name|parameters}} = {{subst:name|parameters}}

Features of {{fsnp}}:

  • It shows a template name with a link to that template, substituted.
  • It shows up to eight parameters.
  • It also shows empty parameters. (See examples below.)
  • It prevents line wraps in its output.
  • It uses normal text style.

Examples[fontem recensere]

Code Output Comments
{{fsnp|name}} {{subst:name}}
{{fsnp|name|first}} {{subst:name|first}}
{{fsnp|name|first|last}} {{subst:name|first|last}}
{{fsnp|name|a|b|c|d|e|f|g|h|i|j}} {{subst:name|a|b|c|d|e|f|g|h}} Shows up to eight parameters. The rest are dropped.
{{fsnp|name||three|four}} {{subst:name||three|four}} Also shows empty parameters.
{{fsnp|name||three|}} {{subst:name||three|}} Even shows empty parameters that come at the end.
{{fsnp|name|first=a|last=b}} {{subst:name}} Equal signs are a problem, but there are a couple ways to fix:
{{fsnp|name|2=first=a|3=last=b}} {{subst:name|first=a|last=b}} Use numbered parameters to fix it. Here, parameter "|2=" is assigned the string "first=a". Start with #2, since "name" is already in the "|1=" slot. Note that all subsequent parameters after a numbered parameter must also be numbered.
{{fsnp|name|first{{=}}a|last{{=}}b}} {{subst:name|first=a|last=b}} Or, simply use, "{{=}}", the equal-sign template, to "escape" the symbol.
{{fsnp|name|2=1=a|3=2=b}} {{subst:name|1=a|2=b}} Both techniques also work with numbered positional parameters (e.g.: "|1=", "|2=").
{{fsnp|name|2=1=a|last{{=}}b}} {{subst:name|last=b}} The named parameter ("|last=") clobbered the prior one ("|2="). Again, all subsequent parameters after a numbered parameter must also be numbered...
{{fsnp|name|2=1=a|3=last=b}} {{subst:name|1=a|last=b}} ... but that's easy to fix, by adding the position number ("|3=") to the last parameter.

Nexus interni