Difference between revisions of "Template:Template-linking templates"

From MINR.ORG WIKI
Line 3: Line 3:
 
-->
 
-->
 
===General-purpose formatting===
 
===General-purpose formatting===
{| class="wikitable navbox collapsible" style="width:auto;font-size:90%;margin:1.0em auto 1.0em auto;vertical-align:top;text-align:center;"
+
{| class="wikitable navbox collapsible" style="width:auto;font-size:90%;margin:1.0em auto 1.0em auto;vertical-align:top;text-align
|+ Comparison of template-linking templates according to their style
 
|-
 
!style=*"|
 
!style="background:#fcc;"| Link style →
 
!style="background:#fee;"| Linked
 
!style="background:#fee;"| Unlinked
 
!style="background:#fee;"| Linked with subst
 
!style="background:#fee;"| Linked including braces
 
!style="background:#fee;"| Linked with alternative text
 
|-
 
!style="background:#ccf;"| Text style ↓
 
|'''↓ {{tlx|tlg}} options<sup>1</sup> →'''
 
|{{n/a}}
 
|{{code|nolink{{=}}yes}}
 
|{{code|subst{{=}}yes}}
 
|{{code|braceinside{{=}}yes}}
 
|{{code|alttext{{=}}Foo}}<br />{{code|2{{=}}Foo}}
 
|-
 
 
|style="background:#eef;"| Normal
 
|style="background:#eef;"| Normal
| {{n/a}}
+
| {{
| {{nowrap|{{tlx|tlg}}<sup>1, 2</sup>}}<br />{{tlx|tl}}<br />{{tlx|tlp}}<sup>2</sup><br />{{tlx|tlu}}<sup>4</sup>
 
| {{tlx|tlf}}<sup>2</sup>
 
| {{tlx|tls}}<br />{{tlx|tlsp}}
 
| {{tlx|tn}}
 
| {{tlx|tla}}
 
|-
 
!style="background:#eef;"| <code>Code</code>
 
| {{code|code{{=}}yes}} or<br />{{code|tt{{=}}yes}}
 
| {{tlx|tlx}}<br />{{tlx|tltt}}<br />{{tlx|tltt2}}
 
| {{tlx|tlc}}<sup>2</sup><br />{{tlx|tld}}<sup>2</sup><br />{{tlx|tnull}}
 
| {{tlx|tlxs}}<br />{{tlx|tltts}}<br />{{tlx|tltts3}}<br />{{tlx|tltss}}<sup>3</sup>
 
| colspan="2" {{n/a}}
 
|-
 
|style="background:#eef;"| '''Bold'''
 
| {{code|bold{{=}}yes}}
 
| {{tlx|tlb}}
 
| rowspan="3" colspan="4" {{n/a}}
 
|-
 
|style="background:#eef;"| '''<code>Bold code</code>'''
 
| {{code|bold{{=}}yes{{!}}code{{=}}yes}}
 
| {{tlx|tlxb}}
 
|-
 
|style="background:#eef;" | ''<code>Italic code</code>''
 
| {{code|italic{{=}}yes{{!}}code{{=}}yes}}
 
| {{tlx|tlxi}}
 
 
|}
 
|}
 
{{clear}}
 
{{clear}}
Line 55: Line 12:
 
*<sup>2</sup> Prevents wrapping of text by placing it inside {{tag|span|params=class="nowrap"}} tags.
 
*<sup>2</sup> Prevents wrapping of text by placing it inside {{tag|span|params=class="nowrap"}} tags.
 
*<sup>3</sup> Uses monospace font but not {{tag|code}}.
 
*<sup>3</sup> Uses monospace font but not {{tag|code}}.
*<sup>4</sup> Allows links to templates in any namespace.
+
*<sup>4
}}
 
 
 
===Other formatting templates===
 
{| class="wikitable sortable" style="vertical-align:top;"
 
! Code example !! Effect !! Notes
 
|-
 
| {{tlx|tl2|<nowiki>Hatnote|lang=fr</nowiki>}} || {{tl2|hatnote|lang=fr}} || Supports linking to sister projects (e.g., fr:Hatnote)
 
 
|-
 
|-
| {{tlx|tlu|User:Ahunt/SSHFS}} || {{tlu|User:Ahunt/SSHFS}} || Supports linking to any namespace
+
| {{tlx|tl2|<nowiki>Hatnote|lang=fr</nowiki>}} || {{tl2|hatnote|lang=fr}} || Supports linking to sister /SSHFS}} || Supports linking to any namespace
 
|-
 
|-
 
| {{tlx|demo|<nowiki><nowiki>{{Hatnote|lang=fr|Some text}}</nowiki></nowiki>}} || {{demo|<nowiki>{{hatnote|lang=fr|Some text}}</nowiki>}} || Shows code and example
 
| {{tlx|demo|<nowiki><nowiki>{{Hatnote|lang=fr|Some text}}</nowiki></nowiki>}} || {{demo|<nowiki>{{hatnote|lang=fr|Some text}}</nowiki>}} || Shows code and example
Line 71: Line 21:
 
|-
 
|-
 
<!-- Yes, I know this isn't actually a template-linking template, but it's a heck of a lot easier to find if it's listed in the docs for e.g. {{tl}} -->
 
<!-- Yes, I know this isn't actually a template-linking template, but it's a heck of a lot easier to find if it's listed in the docs for e.g. {{tl}} -->
| {{tlx|para|<nowiki>title|<var>book title</var></nowiki>}} || {{para|title|<var>book title</var>}} || Formats template parameters for display, with or without values
+
| {{tlx|para|<nowiki>title|< or without values
 
|}
 
|}
  

Revision as of 17:42, 31 July 2016

Template:NavbarTemplate:Float

General-purpose formatting

  • 1 {{tlg}} is the most general, allowing any combination of text style and/or link style options.
  • 2 Prevents wrapping of text by placing it inside <span class="nowrap">...</span> tags.
  • 3 Uses monospace font but not <code>...</code>.
  • 4

|| Supports linking to any namespace

|- | {{demo|<nowiki>{{Hatnote|lang=fr|Some text}}</nowiki>}} || Template:Demo || Shows code and example |- | {{xpd|Hatnote|Some hatnote text}} || Template:If || Shows code, example and a link to expand the template code |- | {{tlx|para|<nowiki>title|< or without values |}

With utility links

Code example Effect
{{lts|Hatnote}} Template:Lts
{{t links|Hatnote}} Hatnote (edit talk history links # /subpages /doc /doc edit /sbox /sbox diff /test) · Module:hatnote
{{tfd links|Hatnote}} Template:Hatnote (edit · talk · history · links · logs · subpages · delete)
{{tiw|Hatnote}} Template:hatnote (backlinks edit)
{{tltt|Hatnote}} {{Hatnote}}
{{tetl|Hatnote}} {{Hatnote}}
links talk view
{{tsetl|Hatnote}} {{subst:Hatnote}}
 links talk view
{{ti|Hatnote}} Template:Hatnote (talk⧼dot-separator⧽links⧼dot-separator⧽edit)
{{tic|Hatnote}} Template:Hatnote (talk links edit)
{{tiw|Hatnote}} Template:Hatnote (backlinks edit)
{{tlt|Hatnote}} {{Hatnote}} (talk)
{{ttl|Hatnote}} Template:Main other{{Hatnote}} (t/l)
{{twlh|Hatnote}} Template:Hatnote (links, talk)