Jump to content

Template:Template-linking templates

From TheOpenRoad Support
Revision as of 23:22, 4 July 2024 by wikipedia>Warudo (Other formatting templates: Removed unused parameter)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

General-purpose formatting

Comparison of template-linking templates according to the styles of generated text and link produced
Text style ↓ {{tlg}} options[note 1]
to achieve text style
Link style
Linked Unlinked Linked with subst Unlinked with subst Linked including braces Linked with alternative text
{{tlg}} options[note 1]
to achieve link style
DEFAULT <syntaxhighlight lang="text" class="" style="" inline="1">nolink=yes</syntaxhighlight> <syntaxhighlight lang="text" class="" style="" inline="1">subst=yes</syntaxhighlight> nolink=yes|subst=yes <syntaxhighlight lang="text" class="" style="" inline="1">braceinside=yes</syntaxhighlight> <syntaxhighlight lang="text" class="" style="" inline="1">alttext=Foo</syntaxhighlight>
<syntaxhighlight lang="text" class="" style="" inline="1">2=Foo</syntaxhighlight>
normal DEFAULT Template:Nowrap[note 1]
Template:Tl
Template:Tlp[note 2]
{{Template:tlu}}[note 3]
{{tlf}}[note 2]
<template link>
Template:Tls
{{subst:Template:tlsu}}[note 3]
{{subst:tlsf}}[note 2]
<template link>
{{tn}} {{tla}}
code <syntaxhighlight lang="text" class="" style="" inline="1">code=yes</syntaxhighlight> {{tl2}}
{{tlx}}
{{Template:tlxu}}[note 3]
Template:Tlc[note 2]
<template link>
{{tnull}}<template link>
{{subst:tlxs}} {{subst:tlsc}}[note 2]
<template link>
monospace <syntaxhighlight lang="text" class="" style="" inline="1">plaincode=yes</syntaxhighlight>[note 4] {{subst:tltss}}[note 5]
kbd <syntaxhighlight lang="text" class="" style="" inline="1">kbd=yes</syntaxhighlight>[note 5]
bold <syntaxhighlight lang="text" class="" style="" inline="1">bold=yes</syntaxhighlight> {{tlb}}
bold+code bold=yes|code=yes {{tlxb}}
italic+code italic=yes|code=yes {{tlxi}}

Template:Reflist

Other formatting templates

Templates producing specialised formatting effects for given templates, modules or parameters
Code example Effect Notes
Template:Tlx
  1. REDIRECT Template:Template journal
|| Supports colors, placeholder texts, named and unnamed parameters

<source lang="wikitext"> <syntaxhighlight lang="wikitext">

</syntaxhighlight> </source>

<syntaxhighlight lang="wikitext">

</syntaxhighlight>

Same as above
Template:Tlx {{Hatnote|Some text|selfref=yes|category=no|lang=fr}} Supports colors, placeholder texts, named and unnamed parameters
Template:Xtag{{Hatnote|Some text|selfref=yes|category=no|lang=fr}}Template:Xtag <syntaxhighlight lang="wikitext" inline></syntaxhighlight> Same as above
Template:Tlx {{hatnote}} Supports linking to sister projects (e.g., fr:Hatnote)
Template:Tlx lang=fr|Some text}}</syntaxhighlight> Shows code and example
Template:Tlx Template:Hatnote Produces a normal link to the template
Template:Tlx
Template:Tlx
[[Template:Hatnote]]
[[Template:Hatnote|Hatnote]]
Formats wikilink, with optional piped link text and blended suffix
Template:Tlx {{#invoke:Example|hello}} Counterpart to Template:Tl for linking to Lua modules
Template:Tlx {{#invoke:Example|hello}} Similar to Template:Tl, but expects the function to be documented and creates a link to the corresponding section
Template:Tlx {{#invoke:Example|hello}} Counterpart to Template:Tl for linking to Lua modules
Template:Tlx <syntaxhighlight lang="lua" inline="1">require('Module:Example')</syntaxhighlight> Link to Lua modules and built-in libraries, showing Lua code.
Template:Tlx Template:Para Formats template parameters for display, with or without values
Template:Tlx [[WP:LASTING]] Takes a shortcut suffix in project namespace and displays it with brackets and the WP: alias in a [[WP:CODE|Template:Tag]] tag.
Template:Tlx
Template:Tlx
Template:Tag
Template:Xtag
Formats [X]HTML tags; can add content, choose opening, closing, or self-closing
Template:Tlx {{d:Ping project}} Wikidata counterpart to Template:Tl
Template:Tlx
Template:Tlx
{{#if}}
{{#if:{{{1}}}|true|false}}
Parser function equivalent to Template:Tl
Template:Tlx {{uc:}} Magic word links

With utility links

Templates producing utility links for a given template (Hatnote used here as example)
Code example Effect
Template:Tlx Template:Hatnote (edit | talk | history | links | watch | logs)
Template:Tlx Template:Hatnote(edit talk links history)
Template:Tlx Template:T links/sandbox links Template:Yesno
Template:Tlx Template:Hatnote (talk · history · transclusions · logs · subpages)
Template:Tlx {{Hatnote}}
links talk edit
Template:Tlx {{subst:Hatnote}}
 links talk edit
Template:Tlx Template:Hatnote (talk⧼dot-separator⧽links⧼dot-separator⧽edit)
Template:Tlx Template:Hatnote (talk links edit)
Template:Tlx m:Template:Hatnote (backlinks edit)
Template:Tlx Template:Hatnote (backlinks edit)
Template:Tlx {{Hatnote}} (talk)
Template:Tlx Template:Hatnote (links, talk)
Template:Tlx Template:Hatnote (links, talk)

Template:Documentation
Cite error: <ref> tags exist for a group named "note", but no corresponding <references group="note"/> tag was found