Template:Template-linking templates: Difference between revisions
Appearance
m →Other formatting templates: Removed unused parameter |
m 1 revision imported |
(No difference)
| |
Latest revision as of 15:30, 19 June 2025
General-purpose formatting[edit source]
| 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
|
<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 Template:Tl Template:Tlp {{Template:tlu}} |
{{tlf}} <template link> |
Template:Tls {{subst:Template:tlsu}} |
{{subst:tlsf}} <template link> |
{{tn}} | {{tla}} |
code
|
<syntaxhighlight lang="text" class="" style="" inline="1">code=yes</syntaxhighlight> | {{tl2}}{{tlx}}{{Template:tlxu}} |
Template:Tlc <template link> {{tnull}}<template link>
|
{{subst:tlxs}}
|
{{subst:tlsc}}<template link> |
— | |
| monospace | <syntaxhighlight lang="text" class="" style="" inline="1">plaincode=yes</syntaxhighlight> |
— | {{subst:tltss}} |
— | |||
| kbd | <syntaxhighlight lang="text" class="" style="" inline="1">kbd=yes</syntaxhighlight> | ||||||
| bold | <syntaxhighlight lang="text" class="" style="" inline="1">bold=yes</syntaxhighlight> | {{tlb}} | — | ||||
bold+code
|
bold=yes
|
{{tlxb}}
| |||||
italic+code
|
italic=yes
|
{{tlxi}}
| |||||
Other formatting templates[edit source]
| Code example | Effect | Notes | |
|---|---|---|---|
| Template:Tlx |
| ||
|
<source lang="wikitext"> <syntaxhighlight lang="wikitext"> </syntaxhighlight> </source> |
<syntaxhighlight lang="wikitext">
</syntaxhighlight> |
Same as above | |
| Template:Tlx | {{Hatnote |
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[edit source]
| 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}} |
| Template:Tlx | {{subst:Hatnote}} |
| 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