Template:Template link expanded/doc: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
m (Reverted edits by 216.157.222.16 (talk) to last revision by Axem Titanium (HG)) |
(update documentation; actually it's 10 parameters, 11th is already hidden) |
||
Line 8: | Line 8: | ||
<!-- Parent template(s) usage begins: ---> |
<!-- Parent template(s) usage begins: ---> |
||
: {{tlx|Tlx|Template|first parameter|second|third| |
: {{tlx|Tlx|Template|first parameter|second|third|...|tenth}} → {{Tlx|Template|first parameter|second|third|...|tenth}} |
||
: {{tlx|Tlx|Template|<nowiki>first|second|...|999th</nowiki>}} |
: {{tlx|Tlx|Template|<nowiki>first|second|...|999th</nowiki>}} |
||
== Purpose and naming == |
== Purpose and naming == |
||
[[Wikt:mnemonic|Mnemonically]] ''''T'''emplate '''l'''ink e'''x'''panded'. After <tt>{{tlx|Tl}}</tt> '''T'''emplate '''l'''ink'. |
[[Wikt:mnemonic|Mnemonically]] ''''T'''emplate '''l'''ink e'''x'''panded'. After <tt>{{tlx|Tl}}</tt> ''''T'''emplate '''l'''ink'. |
||
* This template takes another ''template-name'' and some associated [[Help:Pipe trick|pipe-tricked]] [[m:Parameter#Parameters|(numbered) parameters]] (or 'pass parameters'), and displays them as an 'example demonstration' of how the ''template-name'' template could be coded, literally. Its primary use is in instruction and documentation. |
* This template takes another ''template-name'' and some associated [[Help:Pipe trick|pipe-tricked]] [[m:Parameter#Parameters|(numbered) parameters]] (or 'pass parameters'), and displays them as an 'example demonstration' of how the ''template-name'' template could be coded, literally. Its primary use is in instruction and documentation. |
||
* '''''Specifics:''''' Up to |
* '''''Specifics:''''' Up to 10 pass parameters (numbered or nowiki-keywords) for the specified template are displayed as 'placeholders', and over 10 parameters can be displayed using a coded vertical-bar (as in "<small>&#124;</small>''...''"). A keyword parameter can be used with equals code &#61; or <nowiki>{{=}}</nowiki> or in nowiki-text: "<nowiki>size=10</nowiki>" or all parameters as a string in <nowiki>"<nowiki>"</nowiki> tags; see ''[[#Examples|Examples]]'' at bottom. For more details, see [[{{TALKPAGENAME}}|this talk]] page. |
||
* '''''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>. |
* '''''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>. |
||
Line 53: | Line 52: | ||
:<tt>{{{{BASEPAGENAME}}{{!}}template name}}</tt> |
:<tt>{{{{BASEPAGENAME}}{{!}}template name}}</tt> |
||
:<tt>{{{{BASEPAGENAME}}{{!}}template name{{!}}param}}</tt> |
:<tt>{{{{BASEPAGENAME}}{{!}}template name{{!}}param}}</tt> |
||
:<tt>{{{{BASEPAGENAME}}{{!}}template name{{!}}1{{!}}2{{!}}3}}</tt> |
:<tt>{{{{BASEPAGENAME}}{{!}}template name{{!}}1{{!}}2{{!}}3{{!}}4{{!}}5{{!}}6{{!}}7{{!}}8{{!}}9{{!}}10}}</tt> |
||
:<tt>{{{{BASEPAGENAME}}{{!}}template name{{!}}1{{!}}2{{!}}3&#124;more}}</tt> |
:<tt>{{{{BASEPAGENAME}}{{!}}template name{{!}}1{{!}}2{{!}}3{{!}}4{{!}}5{{!}}6{{!}}7{{!}}8{{!}}9{{!}}10&#124;more}}</tt> |
||
:<tt>{{{{BASEPAGENAME}}{{!}}template name{{!}}param&#61;value}}</tt> |
:<tt>{{{{BASEPAGENAME}}{{!}}template name{{!}}param&#61;value}}</tt> |
||
''Up to |
''Up to 10 placeholders for parameters of the specified template'' |
||
=== Examples === |
=== Examples === |
||
Line 93: | Line 92: | ||
||  |
||  |
||
|- |
|- |
||
|{{Tlx|Tlx|x3|1 |
|{{Tlx|Tlx|x3|1|2|3|4|5|6|7|8|9|10}} |
||
|{{Tlx|x3|1|2|3}} |
|{{Tlx|x3|1|2|3|4|5|6|7|8|9|10}} |
||
||  |
||  |
||
|- |
|- |
||
|{{Tlx|Tlx|x4|1 |
|{{Tlx|Tlx|x4|1|2|3|4|5|6|7|8|9|10|11}} |
||
|{{Tlx|x4|1|2|3|4}} |
|{{Tlx|x4|1|2|3|4|5|6|7|8|9|10|11}} |
||
|up to |
|up to 10 parameters, then ... |
||
|- |
|- |
||
|{{Tlx|Tlx| |
|{{Tlx|Tlx|x5|1|2|3|4|5|6|7|8|9|10&#124;11}} |
||
|{{Tlx| |
|{{Tlx|x5|1|2|3|4|5|6|7|8|9|10|11}} |
||
|align="right"|<tt>&#124;</tt> for more |
|align="right"|<tt>&#124;</tt> for more |
||
|- |
|- |
||
Line 153: | Line 152: | ||
|align="right"|right to left okay |
|align="right"|right to left okay |
||
|- |
|- |
||
|colspan=2| |
|colspan=2| {{Tlx|Tlx|convert|<nowiki><nowiki>14|m|ftin|abbr=out|sp=us</nowiki></nowiki>}} |
||
|unlimited parameters as one nowiki string |
|unlimited parameters as one nowiki string |
||
|} |
|} |