Template:Xpd1/doc: Difference between revisions
(Created page with "{{Documentation subpage}} The template has two parameters: *the template, or the parser function with colon and part after the colon *one (additional) parameter It is a simplif...") |
No edit summary |
||
Line 5: | Line 5: | ||
*one (additional) parameter | *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 | It is a simplified version of <nowiki>{{tim|xpdop3c}}</nowiki>, 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: | Examples: | ||
Line 20: | Line 20: | ||
Named parameters are not supported. Neither are equals signs in parameter values. | Named parameters are not supported. Neither are equals signs in parameter values. | ||
<nowiki>{{xpd1|t np|q=s}}</nowiki> gives: {{xpd1|t np|q=s}} ("q=s" is ignored) | <nowiki>{{xpd1|t np|q=s}}</nowiki> gives: <nowiki>{{xpd1|t np|q=s}}</nowiki> ("q=s" is ignored) | ||
<nowiki>{{xpd1|t np|2=q=s}}</nowiki> gives: {{xpd1|t np|2=q=s}} (wrong result) | <nowiki>{{xpd1|t np|2=q=s}}</nowiki> gives: <nowiki>{{xpd1|t np|2=q=s}}</nowiki> (wrong result) | ||
Actually: | Actually: | ||
*{{xpdnp|t np|1n=1|1v=q=s}} | *<nowiki>{{xpdnp|t np|1n=1|1v=q=s}}</nowiki> | ||
*{{xpdnp|t np|1n=q|1v=s}} | *<nowiki>{{xpdnp|t np|1n=q|1v=s}}</nowiki> | ||
==See also== | ==See also== | ||
* | *Help:Expansion demo templates | ||
*{{tim|xpdt1}} for table row templates | *<nowiki>{{tim|xpdt1}}</nowiki> for table row templates | ||
*{{tim|xpdn}} for named parameters | *{{tim|xpdn}} for named parameters | ||
*{{tiw|xpd1}} | *{{tiw|xpd1}} |
Revision as of 17:42, 28 October 2020
![]() |
This is a documentation subpage for Template:Xpd1 (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
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:
"{{t1|pqr
[[Category:Templates]]}}"
gives "{{pqr}}" [1]
"{{#ifexpr:2<3|pqr
[[Category:Templates]]}}"
gives "pqr" [2]
"{{3x|p
q
[[Category:Templates]]}}"
gives "p
qp
qp
q" [3]
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]
- Help:Expansion demo templates
- {{tim|xpdt1}} for table row templates
- >Template:xpdn (backlinks, edit) for named parameters
- Template:xpd1 (backlinks, edit)