Template:Xpd1/doc: Difference between revisions

From FamilySearch Wiki
No edit summary
No edit summary
 
Line 9: Line 9:
Examples:
Examples:


{{xpd1|t1|pqr}}
<nowiki>{{xpd1|t1|pqr}}</nowiki>


{{xpd1|#ifexpr:2<3|pqr}}
{{xpd1|#ifexpr:2<3|pqr}}

Latest revision as of 17:43, 28 October 2020

The template has two parameters:

  • the template, or the parser function with colon and part after the colon
  • one (additional) parameter

It is a simplified version of {{tim|xpdop3c}}, without any wikitext outside the braces, and with only one parameter to specify the (additional) parameter of the specified template parser function, see Help:Expansion_demo_templates#Limitations.

Examples:

{{xpd1|t1|pqr}}

"{{#ifexpr:2<3|pqr [[Category:Templates]]}}" gives "pqr" [1]

"{{3x|p q [[Category:Templates]]}}" gives "p

qp

qp

q" [2]

Named parameters[edit source]

Named parameters are not supported. Neither are equals signs in parameter values.

{{xpd1|t np|q=s}} gives: {{xpd1|t np|q=s}} ("q=s" is ignored)

{{xpd1|t np|2=q=s}} gives: {{xpd1|t np|2=q=s}} (wrong result)

Actually:

  • {{xpdnp|t np|1n=1|1v=q=s}}
  • {{xpdnp|t np|1n=q|1v=s}}

See also[edit source]