Template talk:T demo

From Meta, a Wikimedia project coordination wiki

This template demonstrates a template with one nameless parameter. It has to be called with the first parameter equal to the second in nowiki tags.

Example:

{{t demo|t|<nowiki>[[a]]</nowiki>|[[a]]}}

gives

"{{t|[[a]]}}" (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-a-end".