Jump to content

Template talk:Tto

Add topic
From Meta, a Wikimedia project coordination wiki

Template:Tto containing "{{{{{1}}}|a{{{2}}}b{{{2}}}c{{{2}}}d}}<noinclude> {{Documentation|content= This 2004 template was once placed at {{tl|tt}}, until it was converted into a [[Template:Languageicon|Languageicon]] template in 2021. Nearly a year later, the history was splitted and it is now here. }} </noinclude>"

  • {{tto|t|efg}} using Template:T containing "<includeonly><!--t-->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"

  • {{tto|void}} gives "".
  • {{tto|ns:0}} gives "".
  • {{tto|NAMESPACE}} gives "Template:NAMESPACE".
  • {{tto|#ifexpr:0|abc}} gives "".
  • {{tto|#ifexpr:1|abc}} gives "aabcbabccabcd".
  • {{tto|#expr:1/7|abc}} gives "0.14285714285714".
  • {{tto|#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

Start a discussion about Template:Tto

Start a discussion