Template:Template link/doc: Difference between revisions
Jump to navigation
Jump to search
m Text replacement - "Category:([A-Za-z]+)\s*(.*)" to "Category:$1 {{lc:$2}}" Tags: Reverted Mobile edit Mobile web edit |
m Text replacement - "{{lc:}}" to "" Tags: Manual revert Reverted |
||
Line 32: | Line 32: | ||
<includeonly> | <includeonly> | ||
<!-- Template categorization/interlanguage links --> | <!-- Template categorization/interlanguage links --> | ||
[[Category:L | [[Category:L {{lc:ink templates}}]] | ||
[[zh:Template:Template link]] | [[zh:Template:Template link]] | ||
Line 38: | Line 38: | ||
<!-- Documentation categorization/interlanguage links --> | <!-- Documentation categorization/interlanguage links --> | ||
[[zh:Template:Template link/doc]] | [[zh:Template:Template link/doc]] | ||
[[Category:T | [[Category:T {{lc:emplate documentation}}]] | ||
</noinclude> | </noinclude> |
Revision as of 21:33, 12 April 2025
This template uses Module:Array, this script is written in Lua.
For more details, please refer to Wikipedia:Lua and Extension:Scribunto.
This template can be used to create a link (Template Link) with curly braces pointing to the corresponding template, allowing users to copy or view related template documentation.
This template also has aliases: {{T}}, {{Template}}, {{Template link}}.
Usage
{{tl|template name}}
or {{tl|template name|parameter}}
.
Examples
Target template without parameters
- Code:
{{tl|hide}}
- Result: {{hide}}
Target template with only 1 parameter
- Code:
{{tl|hide|title}}
- Result: {{hide|title}}
Target template with multiple parameters or named parameters
- Code:
{{tl|hide|title=title|content=text}}
- Result: {{hide|title=title|content=text}}
Notes
- This template can only link to content within the Template: namespace. Therefore, the links generated using this template will automatically prepend the
Template:
prefix.
See Also
- {{Para}}
- {{Param}}
- {{TemplateCode}}