Template:Tlc/doc
![]() |
This is a documentation subpage for Template:Tlc (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
This is the {{tlc{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}
template.
This page is also the documentation for {{tld}} and {{tlf}} that work almost exactly the same.
When showing a template name with brackets in documentation you have to escape the brackets in some way so it doesn't become a call to the template. Instead of using <nowiki></nowiki>
tags you can write it simpler and shorter by using these templates.
Here is how these templates look. Code to the left and actual rendering to the right:
{{tlc{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}
={{name{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}
{{tld{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}
= {{name{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}{{tlf{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}
= {{name{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}
These templates work similarly to {{tl}} and {{tlx{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}, but they don't make the template name into a link. When writing documentation you might want to avoid a lot of unnecessary links, since it decreases readability. So on the first occurrence of a template name use {{tl}} or {{tlx{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}, and then use {{tlc{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}
, {{tld{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} or {{tlf{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}.
Features of {{tlc{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}
, {{tld{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} and {{tlf{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}:
- They show a template name and up to eight parameters.
- They also show empty parameters. (See examples below.)
- They prevent line wraps in their output.
Examples
Wikitables make the <code></code>
tags transparent, that's why the "code colouring
" is missing in these examples.
Code | Result | Comment |
---|---|---|
{{tlc{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | {{tlc{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | Shows its own syntax. |
{{tlc{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | {{name{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | |
{{tlc{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | {{name{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | |
{{tlc{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | {{name{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | |
{{tlc|name|a|b|c|d|e|f|g|h|i|j}} | {{name}} | Shows up to eight parameters. The rest are dropped. |
{{tlc{{{7}}}{{{8}}}{{{9}}}}} | {{name{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | Also shows empty parameters. |
{{tlc{{{8}}}{{{9}}}}} | {{name{{{7}}}{{{8}}}{{{9}}}}} | Even shows empty parameters that come in the end. |
{{tlc{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | {{name{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | Equal signs is a problem, but there is a fix. |
{{tlc{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | {{name{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} | Use numbered parameters to fix it. Remember to start from 2, since the "name" is number 1. |
If you have equal signs in your template parameters then it probably is simpler and clearer to code it using <nowiki>
tags etc. Here are the codes to emulate {{tlf{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}, {{tld{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} and {{tlc{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}
respectively. Code to the left and actual rendering to the right:
<nowiki>{{name|one=a|two=b}}</nowiki>
= {{name|one=a|two=b}}
<tt><nowiki>{{name|one=a|two=b}}</nowiki></tt>
= {{name|one=a|two=b}}
<code><nowiki>{{name|one=a|two=b}}</nowiki></code>
={{name|one=a|two=b}}
See also
- {{tlc}} – Not linked, several parameters and text in
<code></code>
style. - {{tld}} – Not linked, several parameters and teletype text style.
- {{tlf}} – Not linked, several parameters and normal text style.
- {{tl}} – Template link, no parameters and normal text style.
- {{tlx}} – Template link, several parameters and interwiki links, teletype text style.
- {{tn}} – Same as {{tl{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}}, but shows the braces as part of the link.