Anonymous

Template:Tlx/doc: Difference between revisions

From Jenny Everywhere Wiki
no edit summary
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. (However, because this site uses a monospaced font uniformly in the template namespace, this feature cannot clearly be demonstrated here.)
{{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.  
   
   
== Details ==
== Details ==
Line 7: Line 7:
* 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}} [[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>&nbsp;'template&nbsp;name'&nbsp;(<nowiki>{{{1}}}</nowiki>), </code>''&nbsp;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.  
:* <span style=font-family:sans-serif>{{Tlx|Tl|Tl}} display compared to {{Tlx|Tlx|Tl}}: (Tl: {{Tl|Tl}} versus Tlx: {{Tlx|Tl}})</span>
:* <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}}.
68,639

edits