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| ...|tenth|11th}} → {{Tlx|Template|first parameter|second|third|...|tenth|11th}}
: {{tlx|Tlx|Template|first parameter|second|third|...|tenth}} → {{Tlx|Template|first parameter|second|third|...|tenth}}
: {{tlx|Tlx|Template|&lt;nowiki>first|second|...|999th&lt;/nowiki>}}
: {{tlx|Tlx|Template|&lt;nowiki>first|second|...|999th&lt;/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 11 pass parameters (numbered or nowiki-keywords) for the specified template are displayed as 'placeholders', and over 11 parameters can be displayed using a coded vertical-bar (as in "<small>&amp;#124;</small>''...''"). A keyword parameter can be used with equals code &amp;#61; or <nowiki>{{=}}</nowiki> or in nowiki-text: "&lt;nowiki>size=10&lt;/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.
* '''''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>&amp;#124;</small>''...''"). A keyword parameter can be used with equals code &amp;#61; or <nowiki>{{=}}</nowiki> or in nowiki-text: "&lt;nowiki>size=10&lt;/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>&lt;code&gt;&lt;nowiki&gt;</nowiki></code>, for example: <code><nowiki>&lt;code&gt;&lt;nowiki&gt;{{Anytemplate|arg1=23|size=250px|</nowiki><var>other parameters...</var><nowiki>}}&lt;/nowiki&gt;&lt;/code&gt;</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>&lt;code&gt;&lt;nowiki&gt;</nowiki></code>, for example: <code><nowiki>&lt;code&gt;&lt;nowiki&gt;{{Anytemplate|arg1=23|size=250px|</nowiki><var>other parameters...</var><nowiki>}}&lt;/nowiki&gt;&lt;/code&gt;</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>{&#123;{{BASEPAGENAME}}{{!}}template name&#125;}</tt>
:<tt>{&#123;{{BASEPAGENAME}}{{!}}template name&#125;}</tt>
:<tt>{&#123;{{BASEPAGENAME}}{{!}}template name{{!}}param&#125;}</tt>
:<tt>{&#123;{{BASEPAGENAME}}{{!}}template name{{!}}param&#125;}</tt>
:<tt>{&#123;{{BASEPAGENAME}}{{!}}template name{{!}}1{{!}}2{{!}}3&#125;}</tt>
:<tt>{&#123;{{BASEPAGENAME}}{{!}}template name{{!}}1{{!}}2{{!}}3{{!}}4{{!}}5{{!}}6{{!}}7{{!}}8{{!}}9{{!}}10&#125;}</tt>
:<tt>{&#123;{{BASEPAGENAME}}{{!}}template name{{!}}1{{!}}2{{!}}3&amp;#124;more&#125;}</tt>
:<tt>{&#123;{{BASEPAGENAME}}{{!}}template name{{!}}1{{!}}2{{!}}3{{!}}4{{!}}5{{!}}6{{!}}7{{!}}8{{!}}9{{!}}10&amp;#124;more&#125;}</tt>
:<tt>{&#123;{{BASEPAGENAME}}{{!}}template name{{!}}param&amp;#61;value&#125;}</tt>
:<tt>{&#123;{{BASEPAGENAME}}{{!}}template name{{!}}param&amp;#61;value&#125;}</tt>
''Up to three placeholders for parameters of the specified template''
''Up to 10 placeholders for parameters of the specified template''


=== Examples ===
=== Examples ===
Line 93: Line 92:
||&#160;
||&#160;
|-
|-
|{{Tlx|Tlx|x3|1<tt>&#124;</tt>2<tt>&#124;</tt>3}}
|{{Tlx|Tlx|x3|1|2|3|4|5|6|7|8|9&#124;10}}
|{{Tlx|x3|1|2|3}}
|{{Tlx|x3|1|2|3|4|5|6|7|8|9|10}}
||&#160;
||&#160;
|-
|-
|{{Tlx|Tlx|x4|1<tt>&#124;</tt>2<tt>&#124;</tt>3|4}}
|{{Tlx|Tlx|x4|1|2|3|4|5|6|7|8|9&#124;10&#124;11}}
|{{Tlx|x4|1|2|3|4}}
|{{Tlx|x4|1|2|3|4|5|6|7|8|9|10|11}}
|up to 5 parameters, then ...
|up to 10 parameters, then ...
|-
|-
|{{Tlx|Tlx|x4|1<tt>&#124;</tt>2<tt>&#124;</tt>3&amp;#124;4}}
|{{Tlx|Tlx|x5|1|2|3|4|5|6|7|8|9&#124;10&amp;#124;11}}
|{{Tlx|x4|1|2|3&#124;4}}
|{{Tlx|x5|1|2|3|4|5|6|7|8|9|10&#124;11}}
|align="right"|<tt>&amp;#124;</tt> for more
|align="right"|<tt>&amp;#124;</tt> for more
|-
|-
Line 153: Line 152:
|align="right"|right to left okay
|align="right"|right to left okay
|-
|-
|colspan=2| <tt><nowiki>{{Tlx</nowiki></tt>|convert|&lt;nowiki>14|m|ftin|abbr=out|sp=us&lt;/nowiki><tt><nowiki>}}</nowiki></tt>
|colspan=2| {{Tlx|Tlx|convert|<nowiki>&lt;nowiki>14|m|ftin|abbr=out|sp=us&lt;/nowiki></nowiki>}}
|unlimited parameters as one nowiki string
|unlimited parameters as one nowiki string
|}
|}