Template:Xpd1/doc
![]() |
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 >Template:xpdop3c (backlinks, edit), 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.
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: "{{t np|{{{2}}}
[[Category:Templates]]}}"
gives "Template:T np" [4] ("q=s" is ignored)
{{xpd1|t np|2=q=s}} gives: "{{t np|q=s
[[Category:Templates]]}}"
gives "Template:T np" [5] (wrong result)
Actually:
{{t np{{{2n}}}={{{3n}}}={{{4n}}}={{{5n}}}=}}{{{6n}}}=
gives Template:T np [6]
{{t np{{{2n}}}={{{3n}}}={{{4n}}}={{{5n}}}=}}{{{6n}}}=
gives Template:T np [7]
See also[edit source]
- Help:Expansion demo templates
- >Template:xpdt1 (backlinks, edit) for table row templates
- >Template:xpdn (backlinks, edit) for named parameters
- Template:xpd1 (backlinks, edit)