Template:Xpds
This Template:xpds (expansion demo) shows the call of a variable, parser function or template and its result, for documentation. The call is the same as the template call to be demonstrated, except that "xpds|
" is inserted after the opening braces.
The template uses Module:Xpd; see also Module talk:Xpd.
Examples:
{{xpds|CURRENTTIME}}
gives: 01:46
→ 01:46
{{xpds|#expr:1/7}}
gives: 0.14285714285714
→ 0.14285714285714
{{xpds|2x|[[abc]] }}
gives: [[abc]] [[abc]]
→ abc abc
{{xpds|{{#expr:7-5}}x|{{#expr:1/7}} }}
gives: 0.14285714285714 0.14285714285714
→ 0.14285714285714 0.14285714285714
{{xpds|t2demo||abc}}
gives: Template:T2demo
→ Template:T2demo
{{xpds|SeeHook|ParserBeforeStrip}}
gives: [[Manual:Hooks/ParserBeforeStrip{{#translation:}}|ParserBeforeStrip]]
→ [[Manual:Hooks/ParserBeforeStrip{{#translation:}}|ParserBeforeStrip]]
{{xpds|Foreach|SeeHook|delim=,|ParserBeforeStrip|ParserAfterStrip}}
gives:
[[Manual:Hooks/ParserBeforeStrip{{#translation:}}|ParserBeforeStrip]],[[Manual:Hooks/ParserAfterStrip{{#translation:}}|ParserAfterStrip]]
→ [[Manual:Hooks/ParserBeforeStrip{{#translation:}}|ParserBeforeStrip]],[[Manual:Hooks/ParserAfterStrip{{#translation:}}|ParserAfterStrip]]
See also[edit]
- Template:Xpdp - the same, except that it starts the result of the template, variable or parser function call in a new paragraph
- m:Template:Xpd/doc
[[Category:Handbook templates{{#translation:}}|Xpds]]