Template:Template link expanded/doc: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
(→‎Purpose and naming: Different typo to the one that I had already was intent on removing; now that is corrected.)
Line 19:
[[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 [[w:pipe-trick|pipe-tricked]]ed [http[m://meta.wikimedia.org/wiki/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 five pass parameters (numbered or nowiki-keywords) for the specified template are displayed as 'placeholders', and over 5 parameters can be displayed using a coded vertical-bar (as in "<small>&amp;#124;</small>''...''"). A keyword parameter can be used, when tagged as a nowiki-keyword: <nowiki>"<nowiki>size=10<\nowiki>"</nowiki> with each keyword parameter surrounded by <nowiki>"<nowiki>"</nowiki> tags; see ''[[#Examples|Examples]]'' at bottom. For more details, see the [[w:{{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>.
 
----
 
* If given no additional parameters except ''<code>&nbsp;'template&nbsp;name'&nbsp;(<nowiki>{{{1}}}</nowiki>), </code>''&nbsp;it presents the same as the similar {{tl|Tl}} [[W:macro|macro]] template -- a blue link nested in [[W:brackets|curly-braces]]-- the same as a user would apply the template without parameters, but with a noticably clearer font and spacing on most modern browsers.
 
:* {{Tlx|Tl|Tl}} display compared to {{Tlx|Tlx|Tl}}: (Tl: {{Tl|Tl}} versus Tlx: {{Tlx|Tl}})
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu