Template:Template link expanded/doc: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content deleted Content added
tlxb added
noted usage with 999 nowiki parameters & 11 (no longer 5) pass parameters; noted "or all parameters as a string" with nowiki-tags; added example {tlx|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}
Line 13:
<!-- Parent template(s) usage begins: --->
 
: {{tlx|Tlx|Template|first parameter|second|third|fourth| ...|eight|ninth|tenth|eleventh11th}} → {{Tlx|Template|first parameter|second|third|fourth|fifth|sixth|seventh|eight|ninth...|tenth|eleventh11th}}
: {{tlx|Tlx|Template|&lt;nowiki>first|second|...|999th&lt;/nowiki>}}
 
 
== Purpose and naming ==
Line 19 ⟶ 21:
 
* 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 five11 pass parameters (numbered or nowiki-keywords) for the specified template are displayed as 'placeholders', and over 511 parameters can be displayed using a coded vertical-bar (as in "<small>&amp;#124;</small>''...''"). A keyword parameter can be used, whenwith taggedequals ascode a&amp;#61; nowiki-keyword:or <nowiki>"{{=}}</nowiki> or in nowiki-text: "&lt;nowiki>size=10<\nowiki>"<&lt;/nowiki>" withor eachall keywordparameters parameteras surroundeda bystring 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>.
 
Line 155 ⟶ 157:
|| {{Tlx|x2|3=two|2=one}}
|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>
|unlimited parameters as one nowiki string
|}