Template:Tnull/doc

From MTG Wiki
Jump to navigation Jump to search
This is a template documentation subpage for Template:Tnull.
It contains usage information, categories, interlanguage links and other content that is not part of the original template page.

Tnull produces nicely formatted <code>-style display of a template name and, optionally, its parameters, complete with templating braces. In most cases {{tl}} and {{tlx}} is preferred, as they link to the templates they name, but {{tnull}} is appropriate when monospaced, unlinked formatting is desired.

All parameters are unnamed. The target template's name must be the first parameter. Up to 7 descriptors of that template's parameters may follow.

Examples

All unnamed parameters

{{tnull|para|foo|bar|baz}} in the wikicode would yield {{para|foo|bar|baz}} in the final page.

Named parameters

{{tnull|delete|Bad page|3=nocat=1}} yields {{delete|Bad page|nocat=1}}.

Note the requirement to state the parameter number explicitly to allow = to appear in the descriptor text, and that the parameter number within the call to {{tnull}} is one higher than within the call that would be made to the target template. Named parameters are best placed after unnamed ones.

Note

"tnull" refers to "nullifying" template-calling code by placing tnull| just inside the call's braces, changing it to call this template which leaves the original call's code displayed. It can be used for that purpose or simply to document templates.