Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Tlc/doc: Difference between revisions

Template page
Starting to look like documentation.
Some wording.
Line 15: Line 15:
* They show a template name and up to eight parameters.
* They show a template name and up to eight parameters.
* They understand empty parameters and show them. (See examples below.)
* They understand empty parameters and show them. (See examples below.)
* They prevent their output from [[line wrap]]ping.
* They prevent [[line wrap]]s in their output.


=== Examples ===
=== Examples ===

Revision as of 07:42, 21 March 2008

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}}

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}}.

Features of {{tlc}}, {{tld}} and {{tlf}}:

  • They show a template name and up to eight parameters.
  • They understand empty parameters and show them. (See examples below.)
  • They prevent line wraps in their output.

Examples

Wikitables like this one make the <code> tags transparent, that's why the "code colouring" is missing in these examples.

CodeResultComment
{{tlc}} {{{{{1}}}}} 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


Cookies help us deliver our services. By using our services, you agree to our use of cookies.