Template:Tlc/doc: Difference between revisions
meta>Davidgothberg (Intermediate save.) |
meta>Davidgothberg (Intermediate save.) |
||
Line 3: | Line 3: | ||
This is the {{tlc|tlc}} template. | This is the {{tlc|tlc}} template. | ||
This template helps writing documentation which mentions {{tlc|templates}}, or even {{tlc|templates|that|has|parameters}}. It works similarly to {{tl|tl}} and {{tlx|tlx}}, but it doesn't make the template name into a link. | |||
This page is also the documentation for some other templates: | |||
* {{tld|tld}} – Works the same, but looks like this: {{tld|name|parameter}} | |||
* {{tlf|tlf}} – Works the same, but looks like this: {{tlf|name|parameter}} | |||
Writing {{tlc|tlc|template name|parameter}} corresponds to writing | |||
<code><nowiki><code><nowiki>{{template name|parameter}}</nowiki></code></nowiki></code> and produces the output {{tlc|template name|parameter}}. | |||
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|tl}} or {{tlx|tlx}}, and then use {{tlc|tlc}}, {{tld|tld}} or {{tlf|tlf}}. | |||
=== Examples === | === Examples === | ||
<table | Wikitables like this one make the <code><code></code> tags transparent, that's why we don't see the "<code>code colouring</code>" in these examples. | ||
<table class="wikitable"> | |||
<tr><th>Code<th>Result<th>Comment | <tr><th>Code<th>Result<th>Comment | ||
<tr><td>{{tlc|tlc}} <td>{{tlc}} <td>Shows its own syntax | <tr><td>{{tlc|tlc}} <td>{{tlc}} <td>Shows its own syntax |
Revision as of 07:04, 21 March 2008
This is a documentation subpage for Template:Tlc. It may contain usage information, categories and other content that is not part of the original template page. |
This is the {{tlc}}
template.
This template helps writing documentation which mentions {{templates}}
, or even {{templates|that|has|parameters}}
. It works similarly to {{tl}} and {{tlx}}
, but it doesn't make the template name into a link.
This page is also the documentation for some other templates:
{{tld}}
– Works the same, but looks like this:{{name|parameter}}
- {{tlf}} – Works the same, but looks like this: {{name|parameter}}
Writing {{tlc|template name|parameter}}
corresponds to writing
<code><nowiki>{{template name|parameter}}</nowiki></code>
and produces the output {{template name|parameter}}
.
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}}
, and then use {{tlc}}
, {{tld}}
or {{tlf}}.
Examples
Wikitables like this one make the <code>
tags transparent, that's why we don't see the "code colouring
" in these examples.
Code | Result | Comment |
---|---|---|
{{tlc}} | {{tlc|...}} | Shows its own syntax |
{{tlc|name}} | {{name}} | |
{{tlc|name|one}} | {{name|one}} | |
{{tlc|name|one|two}} | {{name|one|two}} | |
{{tlc|name|a|b|c|d|e|f|g|h|i|j}} | {{name|a|b|c|d|e|f|g|h}} | Shows up to eight parameters. The rest are dropped. |
{{tlc|name|||three|four}} | {{name|||three|four}} | Also shows empty parameters. |
{{tlc|name|||three||}} | {{name|||three||}} | Even shows empty parameters that come in the end. |
See also
- {{tlx}}