https://wiki.xenproject.org/index.php?title=Template:Tlg/doc&feed=atom&action=history
Template:Tlg/doc - Revision history
2024-03-28T18:47:19Z
Revision history for this page on the wiki
MediaWiki 1.31.3
https://wiki.xenproject.org/index.php?title=Template:Tlg/doc&diff=1565&oldid=prev
Lars.kurth: 1 revision: Testing import of templates
2011-12-04T23:29:08Z
<p>1 revision: Testing import of templates</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 23:29, 4 December 2011</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Lars.kurth
https://wiki.xenproject.org/index.php?title=Template:Tlg/doc&diff=1564&oldid=prev
Funandtrvl: add cat
2011-07-20T00:47:35Z
<p>add cat</p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --><br />
<br />
==Explanation==<br />
{{tlx|tlg}} ('''<u>t</u>emplate <u>l</u>ink, <u>g</u>eneral''') is a general template for inserting a template link. It can be used to replace or implement any of the more specific <code><nowiki>{{tl*}}</nowiki></code> templates, e.g. {{tlx|tl}}, {{tlx|tlx}} or {{tlx|tlb}}. Parameters are:<br />
* {{code|bold{{=}}yes}}: '''Boldface''' the text, like for {{tlx|tlb}} and {{tlx|tlxb}}<br />
* {{code|italic{{=}}yes}}: ''Italicizes'' the parameters, like for {{tlx|tlxi}}<br />
* {{code|tt{{=}}yes}}: Use a <tt>monospaced</tt> font, like for {{tlx|tlx}} and {{tlx|tlxb}}<br />
* {{code|code{{=}}yes}}: Use the <code><nowiki><code>...</code></nowiki></code> HTML attribute (usually a monospaced font), like for {{tlx|tlc}}<br />
* {{code|nolink{{=}}yes}}: Don't insert a template link, like for {{tlx|tlf}}, {{tlx|tld}}, and {{tlx|tlc}}<br />
* {{code|anypage{{=}}yes}}: Allow linking to arbitrary page (not just template), as with {{tlx|tlu}}<br />
* {{code|braceinside{{=}}yes}}: Put braces inside the link, like for {{tlx|tn}}<br />
* {{code|subst{{=}}yes}}: Add a {{code|subst:}} prefix, like for {{tlx|tls}}<br />
* {{code|alttext{{=}}FOO}}: Specify alternative surface text for a link, like for {{tlx|tla}}<br />
<br />
== Examples ==<br />
{{#ifeq:{{SITENAME}}|Wikipedia|<!-- Skip message--->|<br />
{{#ifeq:{{SITENAME}}|Meta|<!-- No note needed --->|<!-- Other Sisters Note: ---><br />
;Note: On the source sister projects, en.wikipedia and Meta, '''X0, X1, X2,..., X9 are sandbox templates''' 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.<br />
}}}}<br />
<br />
{| border="1" cellpadding="4" class="wikitable"<br />
! Code<br />
! Result<br />
! Remark<br />
|-<br />
|{{Tlx|Tlg|Abc}}<br />
|{{Tlg|Abc}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|ABC}}<br />
|{{Tlg|ABC}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|AbC}}<br />
|{{Tlg|AbC}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x0}}<br />
|{{Tlg|x0}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x0|bold{{=}}yes}}<br />
|{{Tlg|x0|bold=yes}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x1|one|italic{{=}}yes}}<br />
|{{Tlg|x1|one|italic=yes}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x0|code{{=}}yes}}<br />
|{{Tlg|x0|code=yes}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x0|tt{{=}}yes}}<br />
|{{Tlg|x0|tt=yes}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x0|nolink{{=}}yes}}<br />
|{{Tlg|x0|nolink=yes}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x0|subst{{=}}yes}}<br />
|{{Tlg|x0|subst=yes}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x0|braceinside{{=}}yes}}<br />
|{{Tlg|x0|braceinside=yes}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x0|alttext{{=}}Link to x0 template}}<br />
|{{Tlg|x0|alttext=Link to x0 template}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x0|anypage{{=}}yes}}<br />
|{{Tlg|x0|anypage=yes}}<br />
|Now the expression links to [[x0]] (the spaceship, genetic disease, etc.) rather than [[Template:x0]]. Mostly useful for templates in user space.<br />
|-<br />
|{{Tlx|Tlg|x0|bold{{=}}yes|tt{{=}}yes|braceinside{{=}}yes}}<br />
|{{Tlg|x0|bold=yes|tt=yes|braceinside=yes}}<br />
|No reason you can't combine multiple parameter settings.<br />
|-<br />
|{{Tlx|Tlg|x1|one}}<br />
|{{Tlg|x1|one}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x2|one|two}}<br />
|{{Tlg|x2|one|two}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x2|bold{{=}}yes|tt{{=}}yes|one|two}}<br />
|{{Tlg|x2|bold=yes|tt=yes|one|two}}<br />
|Can combine named and anonymous parameters ...<br />
|-<br />
|{{Tlx|Tlg|x2|one|two|bold{{=}}yes|tt{{=}}yes}}<br />
|{{Tlg|x2|one|two|bold=yes|tt=yes}}<br />
|... in any order … <br />
|-<br />
|{{Tlx|Tlg|x2|one|tt{{=}}yes|two|bold{{=}}yes|three}}<br />
|{{Tlg|x2|bold=yes|one|tt=yes|two|bold=yes|three}}<br />
|... even intermixed ...<br />
|-<br />
|{{Tlx|Tlg|x2|one|tt{{=}}yes|two|bold{{=}}yes|three|italic{{=}}yes}}<br />
|{{Tlg|x2|bold=yes|one|tt=yes|two|bold=yes|three|italic=yes}}<br />
|... with many different configurations. <br />
|-<br />
|{{Tlx|Tlg|x3|1|2|3|4|5|6|7|8|9&#124;10}}<br />
|{{Tlg|x3|1|2|3|4|5|6|7|8|9|10}}<br />
||&#160;<br />
|-<br />
|{{Tlx|Tlg|x4|1|2|3|4|5|6|7|8|9&#124;10&#124;11}}<br />
|{{Tlg|x4|1|2|3|4|5|6|7|8|9|10|11}}<br />
|up to 10 parameters, then ...<br />
|-<br />
|{{Tlx|Tlg|x5|1|2|3|4|5|6|7|8|9&#124;10&amp;#124;11}}<br />
|{{Tlg|x5|1|2|3|4|5|6|7|8|9|10&#124;11}}<br />
|align="right"|<tt>&amp;#124;</tt> for more<br />
|-<br />
|colspan=2| {{Tlx|Tlg|convert|<nowiki>&lt;nowiki>14|m|ftin|abbr=out|sp=us&lt;/nowiki></nowiki>}}<br />
|unlimited parameters as one nowiki string<br />
|-<br />
|{{Tlx|Tlg}}<br />
|{{Tlg}}<br />
|with no arguments, the current page name is substituted<br />
|-<br />
|{{Tlx|Tlg|x1|x&#61;u}}<br />
|{{Tlg|x1|x=u}}<br />
|'''=''' won't work<br />
|-<br />
|{{Tlx|Tlg|x1|x&amp;#61;u}}<br />
|{{Tlg|x1|x&#61;u}}<br />
|align="right"|<tt>&amp;#61;</tt> is okay<br />
|-<br />
|{{Tlx|Tlg|x1|x<nowiki>{{=}}</nowiki>u}}<br />
|{{Tlg|x1|x{{=}}u}}<br />
|align="right"|<tt><nowiki>{{=}}</nowiki></tt> is okay<br />
|-<br />
|{{Tlx|Tlg|x1|&lt;nowiki&gt;x&#61;u&lt;/nowiki&gt;}}<br />
|{{Tlg|x1|<nowiki>x=u</nowiki>}}<br />
|align="right"|sticky nowiki is okay<br />
|-<br />
|{{Tlx|Tlg|x2|&#160;|two}}<br />
|{{Tlg|x2| |two}}<br />
|empty won't work<br />
|-<br />
|{{Tlx|Tlg|x2|&amp;#32;|two}}<br />
|{{Tlg|x2|&#32;|two}}<br />
|align="right"|<tt>&amp;#32;</tt> is okay<br />
|-<br />
|{{Tlx|Tlg|x2|&amp;nbsp;|two}}<br />
|{{Tlg|x2|&nbsp;|two}}<br />
|align="right"|<tt>&amp;nbsp;</tt> is okay<br />
|-<br />
|{{Tlx|Tlg|x2| &amp;#124; two}}<br />
|{{Tlg|x2| &#124; two}}<br />
|align="right"|<tt>&amp;#124;</tt> is okay<br />
|-<br />
|| {{Tlx|Tlg|x2| {&#123;!&#125;} two}}<br />
|| {{Tlg|x2| {{!}} two}}<br />
|align="right"|{{Tlg|!}} is dubious<br />
|-<br />
|| {{Tlx|Tlg|x2|<nowiki>2=</nowiki>|<nowiki>3=two</nowiki>}}<br />
|| {{Tlg|x2|2=|3=two}}<br />
|empty really doesn't work<br />
|-<br />
|| {{Tlx|Tlg|x2|<nowiki>2=one</nowiki>|two}}<br />
|| {{Tlg|x2|2=one|two}}<br />
|'''two''' clobbers '''2=one'''<br />
|-<br />
|| {{Tlx|Tlg|x2|<nowiki>3=two</nowiki>|<nowiki>2=one</nowiki>}}<br />
|| {{Tlg|x2|3=two|2=one}}<br />
|align="right"|right to left okay<br />
|}<includeonly><br />
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --><br />
[[Category:Typing-aid templates]]<br />
[[Category:Internal link templates]]<br />
</includeonly></div>
Funandtrvl