Template talk:Tt

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

Template:Tt containing "{{{{{1}}}|a{{{2}}}b{{{2}}}c{{{2}}}d}}"

  • {{tt|t|efg}} using Template:T containing "<includeonly>start-{{{1|pqr}}}-end</includeonly><noinclude><nowiki>start-{{{1|pqr}}}-end</nowiki>

== Examples == {| class = "wikitable" ! Code ! Result |- style="vertical-align:top;" | <pre> {{T}} </pre> ||{{T}} |- style="vertical-align:top;" | <pre> {{T|}} </pre> ||{{T|}} |- style="vertical-align:top;" | <pre> {{T|abc}} </pre> ||{{T|abc}} |- style="vertical-align:top;" | <pre> {{T|abc|def}} </pre> ||{{T|abc|def}} |- style="vertical-align:top;" | <pre> {{T|1=abc|1=def}} </pre> ||{{T|1=abc|1=def}} |- style="vertical-align:top;" | <pre> {{T|abc|1=def}} </pre> ||{{T|abc|1=def}} |- style="vertical-align:top;" | <pre> {{T|1=abc|def}} </pre> ||{{T|1=abc|def}} |- style="vertical-align:top;" | <pre> {{T|{{T}}}} </pre> ||{{T|{{T}}}} |- style="vertical-align:top;" | <pre> {{T|{{T|{{T}}}}}} </pre> ||{{T|{{T|{{T}}}}}} |- style="vertical-align:top;" | <pre> {{T|{{T|{{T|{{T}}}}}}}} </pre> ||{{T|{{T|{{T|{{T}}}}}}}} |- style="vertical-align:top;" | <pre> {{T|a{{T|b}}}} </pre> ||{{T|a{{t|b}}}} |- style="vertical-align:top;" | <pre> {{T|{{T|a<nowiki>=</nowiki>b}}}} </pre> ||{{T|{{T|a=b}}}} |- style="vertical-align:top;" | <pre> {{T|<nowiki>a=b</nowiki>}} </pre> ||{{T|a=b}} |- style="vertical-align:top;" | <pre> {{T|1<nowiki>=a=b</nowiki>}} </pre> ||{{T|1=a=b}} |} <!-- customize to illustrate parameter use; remove space in subst to activate it; {{sub st:nwrt|{{T|}}}} {{sub st:nwrt|{{T|}}}} {{sub st:nwrt|{{T|}}}} {{sub st:nwrt|{{T|}}}} {{sub st:nwrt|{{T|}}}} {{sub st:nwrt|{{T|}}}} {{sub st:nwrt|{{T|}}}} {{sub st:nwrt|{{T|}}}} {{sub st:nwrt|{{T|}}}} {{sub st:nwrt|{{T|}}}} --> [[Category:Demo template]]</noinclude>" gives "start-aefgbefgcefgd-end"

  • {{tt|void}} gives "".
  • {{tt|ns:0}} gives "".
  • {{tt|NAMESPACE}} gives "Template:NAMESPACE".
  • {{tt|#ifexpr:0|abc}} gives "".
  • {{tt|#ifexpr:1|abc}} gives "aabcbabccabcd".
  • {{tt|#expr:1/7|abc}} gives "0.14285714285714".
  • {{tt|#expr:1/7}} gives "0.14285714285714".
  • {{NAMESPACE}} gives Template talk
  • {{NAMESPACE|abc}} gives Template:NAMESPACE
  • {{ns:4|abc}} gives Meta
  • {{#expr:1/7|abc}} gives 0.14285714285714

Thus some variables simply ignore a dummy "parameter", while for others the parameter causes the variable to be interpreted as a non-existing template. It's somewhat confusing if the "non-existing" template does exist, as it's the case on Meta for

Meta