Template:XpdnpEdit This Page

From FamilySearch Wiki

Revision as of 09:40, 28 April 2012 by Cottrells (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
[view] [edit] [history] [purge] Documentation icon Template documentation

This Template:Til (expansion demo with named parameters) shows the call of a template or switch and its result, for documentation. It works with up to 6 named parameters.

Examples

Examples, compared with equivalent calls of >Template:xpdoc (backlinks, edit), >Template:xpdopec (backlinks, edit), and >Template:xpdopepec (backlinks, edit):

  • {{xpdnp|tc}} gives: {{tc}} gives in [1]
  • {{xpdoc|tc}} gives: "{{tc}}" → "in" [2]
  • {{xpdnp|#switch:q|1n=p|1v=u|2n=q|2v=v}} gives: {{#switch:q|p=u|q=v}} gives v [6]
  • {{xpdopepec|#switch:q|p|u|q|v}} gives: Template:Xpdopepec
  • {{xpd5opepec||||||#switch:q|p|u|q|v}} gives: Template:Xpd5opepec

While the template works for templates without parameters it does not work properly for variables:

Therefore, for variables use >Template:xpdoc (backlinks, edit) instead:

  • {{xpdoc|CURRENTTIME}} gives: "{{CURRENTTIME}}" → "06:09" [8]