Content deleted Content added
category |
Wikify table; transparent background to highlight code |
||
Line 71:
=== Examples ===
{| class="wikitable" style="background: transparent"
|-
|-
|-
|-
|-
|-
|-
|-
|-
|}
▲<tr><th>Code<th>Result<th>Comment
▲<tr><td>{{tlc|tlsc}} <td>{{tlsc}} <td>Shows its own syntax.
▲<tr><td>{{tlc|tlsc|name}} <td>{{tlsc|name}} <td>
▲<tr><td>{{tlc|tlsc|name|one}} <td>{{tlsc|name|one}} <td>
▲<tr><td>{{tlc|tlsc|name|one|two}} <td>{{tlsc|name|one|two}} <td>
▲<tr><td><code><nowiki>{{{tlsc|name|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u}}</nowiki></code> <td>{{tlsc|name|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u}} <td>Shows up to 16 parameters. The rest are dropped.
▲<tr><td>{{tlc|tlsc|name|||three|four}} <td>{{tlsc|name|||three|four}} <td>Also shows empty parameters.
▲<tr><td>{{tlc|tlsc|name|||three||}} <td>{{tlsc|name|||three||}} <td>Even shows empty parameters that come in the end.
▲<tr><td>{{tlc|tlsc|name|3=one=a|4=two=b}} <td>{{tlsc|name|one=a|two=b}} <td>The use of equals signs is a problem, but there is a fix; see next row.
▲<tr><td>{{tlc|tlsc|name|3=2=one=a|4=3=two=b}} <td>{{tlsc|name|2=one=a|3=two=b}} <td>Use numbered parameters to fix the problem with equals signs. Remember to start from 2, since the "name" is number 1.
* '''''Exceptions:''''' If the intended template lists numerous/keyword parameters, then perhaps this template should really ''not'' be used, and just hardcode the usage with <code><nowiki><code><nowiki></nowiki></code>, for example: <code><nowiki><code><nowiki>{{Anytemplate|arg1=23|size=250px|</nowiki><var>other parameters...</var><nowiki>}}</nowiki></code></nowiki></code>. If a vertical display, with parameters on their own lines, is desired, this can also be laid out manually in this manner, or more rapidly done with <code><nowiki><pre>...</pre></nowiki></code>.
|