Template:Tlx/doc
This page will only parse completely when it is included in another page.
[redirect]Documentation subpageTemplate:r from other template
[/redirect]
-
[template]tlx|tlx|template|first parameter|second|third|fourth|fifth|sixth|seventh| eight|ninth[/template] ? [template]tlx|template|first parameter|second|third|fourth|fifth|sixth|seventh| eight|ninth[/template]
[h="2"]Purpose and naming[/h]
[wiki="Wikt:mnemonic"]Mnemonically[/wiki] [b]'T[/b]emplate [b]l[/b]ink e[b]x[/b]panded'... after <tt>[template]tlx|tl[/template]</tt> [b]T[/b]emplate [b]l[/b]ink'
[list][*] This template takes another [i]template-name[/i] and some associated [wiki="w:pipe-trick"]pipe-tricked[/wiki] [url="http://meta.wikimedia.org/wiki/Parameter#Parameters"](numbered) parameters[/url] (or 'pass parameters'), and displays them as an 'example demonstration' of how the [i]template-name[/i] template could be coded, literally. Its primary use is in instruction and documentation.
[*] [b][i]Specifics:[/b][/i] 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>|</small>[i]...[/i]"). A keyword parameter can be used, when tagged as a nowiki-keyword: "[noparse]siz=10<\nowiki>" with each keyword parameter surrounded by "<nowiki>" tags; see [i][wiki="Tlx/doc#Examples"]Examples[/wiki][/i] at bottom. For more details, see the [wiki="w:[var]TALKPAGENAME[/var]"]this talk[/wiki] page.
[*] [b][i]Exceptions:[/b][/i] If the intended template lists numerous/keyword parameters, then perhaps this template should really [i]not[/i] be used, and just hardcode the usage with <code><code><nowiki></code>, for example: <code><nowiki><code><nowiki&g t;{{Anytemplate|arg1=23|si z=250px|<var>other parameters...</var>}}</code>[/noparse]</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>[code]...[/code]</code>.
[/LIST]
[hr][/hr]
[list][*] If given no additional parameters except [i]<code> 'template name' ({&# 123;{1}}}), </code>[/i] it presents the same as the similar [template]tl|Tl[/template] [wiki="W:macro"]macro[/wiki] template -- a blue link nested in [wiki="W:brackets"]curly-braces[/wiki]-- the same as a user would apply the template without parameters, but with a noticably clearer font and spacing on most modern browsers.
[/LIST]
[indent]* [template]Tlx|Tl|Tl[/template] display compared to [template]Tlx|Tlx|Tl[/template]: (Tl: [template]Tl|Tlx[/template] versus Tlx: [template]Tlx|Tl[/template]) [/indent]
[list][*] Comparatively, [template]Tlx|Tl[/template] will not take or display additional parameters, and for minor technical reasons, may preferred for mere listing and referencing in long pages involving a lot of template expansions[wiki="W:WP:DPP"]1[/wiki].
[/LIST]
[list][*] Additionally, Tlx will take a 'named' parameter 'SISTER' to link interwiki to other sister projects such as one of these examples: '|SISTER=W:', 'Tlx|SISTER=M:', 'Tlx|SISTER=Q:', 'Tlx|SISTER=S:', allowing documentation or discourse about a template across interwiki boundaries. Small 'front end' Shell or convience templates [template]Tlx|Tlxw[/template] and [template]tlx|Tlxm[/template] are typing-aid templates available at Meta for automatic substitution in discussions about templates on BrWiki or Meta.
[/LIST]
[hr][/hr]
[h="2"]Documentation[/h]
{{[template="[var]PAGENAME[/var]"][var]PAGENAME[/var[/template]]}}
is a generalization of [template]Tlxw|Tl|x[/template], [template]Tlxw|Tlp|x|y[/template],
etcetera with arguably better readable
output. This depends on the browser, but too narrow
uses of "[b]{[/b]", "[b]|[/b]", "[b]}[/b]" in conjunction
with links can be hard to read.
[h="3"] Usage [/h]
[indent]<tt>{{[var]PAGENAME[/var]!template name}}</tt>[/indent]:<tt>{{[var]PAGENAME[/var]!template name!param}}</tt>
[indent]<tt>{{[var]PAGENAME[/var]!template name!1!2!3}}</tt>[/indent]:<tt>{{[var]PAGENAME[/var]!template name!1!2!3|more}}</tt>
[indent]<tt>{{[var]PAGENAME[/var]!template name!param=value}}</tt>[/indent][i]Up to three placeholders for parameters of the specified template[/i]
[h="3"] Examples [/h]
[if="[var]SITENAME[/var]==BrWiki"][else /]
[if="[var]SITENAME[/var]==Meta"][else /]
;Note: On the source sister projects, en.wikipedia and Meta, [b]X0, X1, X2,..., X9 are sandbox templates[/b] for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other Sister projects.
[/if][/if]
[table] border="1" cellpadding="4" class="wikitable"
! Code
! Result
! Remark
|-
|[template]Tlx|SISTER=W:|Tlx|x0[/template]
|[template]Tlx|SISTER=W:|x0[/template]
|| 
|-
|[template]Tlx|SISTER=W:|Tlx|Abc[/template]
|[template]Tlx|SISTER=W:|Abc[/template]
|| 
|-
|[template]Tlx|SISTER=W:|Tlx|ABC[/template]
|[template]Tlx|SISTER=W:|ABC[/template]
|| 
|-
|[template]Tlx|SISTER=W:|Tlx|AbC[/template]
|[template]Tlx|SISTER=W:|AbC[/template]
|| 
|-
|[template]Tlx|SISTER=W:|Tlx|x1|one[/template]
|[template]Tlx|SISTER=W:|x1|one[/template]
|| 
|-
|[template]Tlx|SISTER=W:|Tlx|x2|one|two[/template]
|[template]Tlx|SISTER=W:|x2|one|two[/template]
|| 
|-
|[template]Tlx|SISTER=W:|Tlx|x3|1<tt>|</tt>2<tt>|</tt>3[/template]
|[template]Tlx|SISTER=W:|x3|1|2|3[/template]
|| 
|-
|[template]Tlx|SISTER=W:|Tlx|x4|1<tt>|</tt>2<tt>|</tt>3|4[/template]
|[template]Tlx|SISTER=W:|x4|1|2|3|4[/template]
|up to 5 parameters, then ...
|-
|[template]Tlx|SISTER=W:|Tlx|x4|1<tt>|</tt>2<tt>|</tt>3|4[/template]
|[template]Tlx|SISTER=W:|x4|1|2|3|4[/template]
|align="right"|<tt>|</tt> for more
|-
|[template]Tlx|SISTER=W:|Tlx|x1|x=u[/template]
|[template]Tlx|SISTER=W:|x1|x=u[/template]
|[b]=[/b] won't work
|-
|[template]Tlx|SISTER=W:|Tlx|x1|x=u[/template]
|[template]Tlx|SISTER=W:|x1|x=u[/template]
|align="right"|<tt>=</tt> is okay
|-
|[template]Tlx|SISTER=W:|Tlx|x1|x{{= }}u[/template]
|[template]Tlx|SISTER=W:|x1|x[template]=[/template]u[/template]
|align="right"|<tt>{{=}}</tt> is okay
|-
|[template]Tlx|SISTER=W:|Tlx|x1|x=u[/template]
|[template]Tlx|SISTER=W:|x1|x=u[/template]
|align="right"|sticky nowiki is okay
|-
|[template]Tlx|SISTER=W:|Tlx|x2| |two[/template]
|[template]Tlx|SISTER=W:|x2| |two[/template]
|empty won't work
|-
|[template]Tlx|SISTER=W:|Tlx|x2| |two[/template]
|[template]Tlx|SISTER=W:|x2| |two[/template]
|align="right"|<tt> </tt> is okay
|-
|[template]Tlx|SISTER=W:|Tlx|x2| |two[/template]
|[template]Tlx|SISTER=W:|x2| |two[/template]
|align="right"|<tt> </tt> is okay
|-
|[template]Tlx|SISTER=W:|Tlx|x2| | two[/template]
|[template]Tlx|SISTER=W:|x2| | two[/template]
|align="right"|<tt>|</tt> is okay
|-
|| [template]Tlx|SISTER=W:|Tlx|x2| {{!}} two[/template]
|| [template]Tlx|SISTER=W:|x2| ! two[/template]
|align="right"|[template]Tlx|SISTER=W:|![/template] is dubious
|-
|| [template]Tlx|SISTER=W:|Tlx|x2|2=|3=two [/template]
|| [template]Tlx|SISTER=W:|x2|2=|3=two[/template]
|empty really doesn't work
|-
|| [template]Tlx|SISTER=W:|Tlx|x2|2=one|two[/template]
|| [template]Tlx|SISTER=W:|x2|2=one|two[/template]
|[b]two[/b] clobbers [b]2=one[/b]
|-
|| [template]Tlx|SISTER=W:|Tlx|x2|3=two|2=one [/template]
|| [template]Tlx|SISTER=W:|x2|3=two|2=one[/template]
|align="right"|right to left okay
[/table]
[h="2"]See also[/h]
[wiki="w:Template:Para"]Template:Para[/wiki] – for giving examples of template parameters and values only, instead of entire templates with parameters.
[top]Pages That Use This Template
The following pages include this template:
Contributors: | ,
Created by Last edited by , 10-23-2011 at 02:14 PM 0 Comments, 2,012 Views |
, 11-23-2008 at 07:16 PM
Bookmarks