跳转到内容

模板:Xpds

来自天灾之下:危险连接资料站
wiki>Pppery2024年12月11日 (三) 04:56的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
模板文档

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: {{CURRENTTIME}} → 03:10


{{xpds|#expr:1/7}} gives: {{#expr:1/7}} → 0.14285714285714


{{xpds|2x|abc}} gives: {{2x|[[abc]] }} → abc abc


{{xpds|2x|0.14285714285714}} gives: {{2x|0.14285714285714 }} → 0.14285714285714 0.14285714285714


{{xpds|t2demo|abc}} gives: {{t2demo||abc}} → 模板:T2demo


{{xpds|hook|ParserBeforePreprocess}} gives: {{hook|ParserBeforePreprocess}} → ParserBeforePreprocess


{{xpds|Foreach|hook|delim=,|ParserBeforePreprocess|ParserAfterTidy}} gives:

{{Foreach|hook|ParserBeforePreprocess|ParserAfterTidy|delim=,}} → ParserBeforePreprocess ,ParserAfterTidy

See also