68,426
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{tlx|tlx}} — an acronym for '''template link expanded''' — is a sort of more useful sister to {{tlx|tl}}. It allows you do demonstrate templates more fully, by letting you show not just the template name, but ''also the parameters''. It's almost always preferable to use {{tlx|tlx}} than {{tlx|tl}} — even when you're ''not'' demonstrating parameters — because it automatically converts to a highly readable monospaced font. | {{tlx|tlx}} — an acronym for '''template link expanded''' — is a sort of more useful sister to {{tlx|tl}}. It allows you do demonstrate templates more fully, by letting you show not just the template name, but ''also the parameters''. It's almost always preferable to use {{tlx|tlx}} than {{tlx|tl}} — even when you're ''not'' demonstrating parameters — because it automatically converts to a highly readable monospaced font. (However, because this site uses a monospaced font uniformly in the template namespace, this feature cannot clearly be demonstrated here.) | ||
== Details == | == Details == | ||
Line 6: | Line 6: | ||
* '''''Exceptions:''''' If the intended template lists numerous parameters, then perhaps this template should really ''not'' be used, and just hardcode the usage with {{nowrap|<code><nowiki><code><nowiki></nowiki></code>}}, for example: {{nowrap|<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 {{nowrap|<code><nowiki><pre>...</pre></nowiki></code>}}. | * '''''Exceptions:''''' If the intended template lists numerous parameters, then perhaps this template should really ''not'' be used, and just hardcode the usage with {{nowrap|<code><nowiki><code><nowiki></nowiki></code>}}, for example: {{nowrap|<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 {{nowrap|<code><nowiki><pre>...</pre></nowiki></code>}}. | ||
* If given no additional parameters except ''<code> 'template name' (<nowiki>{{{1}}}</nowiki>), </code>'' it presents the same as the similar {{tl|Tl}} [[macro]] template -- a blue link nested in [[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. | * If given no additional parameters except ''<code> 'template name' (<nowiki>{{{1}}}</nowiki>), </code>'' it presents the same as the similar {{tl|Tl}} [[macro]] template -- a blue link nested in [[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}}) | :* <span style=font-family:sans-serif>{{Tlx|Tl|Tl}} display compared to {{Tlx|Tlx|Tl}}: (Tl: {{Tl|Tl}} versus Tlx: {{Tlx|Tl}})</span> | ||
::''Because this page renders ''entirely'' in a monospaced font, this feature will not display properly here. If you want to see | |||
* Comparatively, {{Tlx|Tl}} will not take or display additional parameters, and for minor technical reasons, may be preferred for mere listing and referencing in long pages involving a lot of template expansions. | * Comparatively, {{Tlx|Tl}} will not take or display additional parameters, and for minor technical reasons, may be preferred for mere listing and referencing in long pages involving a lot of template expansions. | ||
* {{tlx|Tlx}} has a named parameter ''subst''. Setting this parameter to any string of length 1 or greater will place the string "subst:" before the template name, linked to {{w|Help:Substitution}}. This is useful to indicate when a template should be substituted. For example {{tlx|Tlx|Welcome|<nowiki>subst=Y</nowiki>}} will display {{Tlx|Welcome|subst=Y}}. | * {{tlx|Tlx}} has a named parameter ''subst''. Setting this parameter to any string of length 1 or greater will place the string "subst:" before the template name, linked to {{w|Help:Substitution}}. This is useful to indicate when a template should be substituted. For example {{tlx|Tlx|Welcome|<nowiki>subst=Y</nowiki>}} will display {{Tlx|Welcome|subst=Y}}. |
edits