Template:Xpdnp/docEdit This Page

From FamilySearch Wiki

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, 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}} [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]]" → "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}} [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]] [[Category:Templates]]" → "11:42" [8]

  • This page was last modified on 28 April 2012, at 09:41.
  • This page has been accessed 234 times.