The editors' meeting has been canceled for technical reasons.
Template:Template link/doc: Difference between revisions
Jump to navigation
Jump to search
m 1 revision imported |
No edit summary |
||
Line 2: | Line 2: | ||
{{lua|Array}} | {{lua|Array}} | ||
{{shortcut|tl|t}} | {{shortcut|tl|t}} | ||
This template can be used to create a link (Template Link) with curly braces pointing to the corresponding [[help:Template|template]], allowing users to copy or view related [[help:Template|template]] documentation. | |||
This template also has aliases: {{tl|T}}, {{tl|Template}}, {{tl|Template link}}. | |||
== | == Usage == | ||
<code><nowiki>{{tl| | <code><nowiki>{{tl|template name}}</nowiki></code> or <code><nowiki>{{tl|template name|parameter}}</nowiki></code>. | ||
== | == Examples == | ||
=== | === Target template without parameters === | ||
: | :Code: <code><nowiki>{{tl|hide}}</nowiki></code> | ||
: | :Result: {{tl|hide}} | ||
=== | === Target template with only {{color|blue|1}} parameter === | ||
: | :Code: <code><nowiki>{{tl|hide|title}}</nowiki></code> | ||
: | :Result: {{tl|hide|title}} | ||
=== | === Target template with {{color|green|multiple}} parameters or named parameters === | ||
: | :Code: <code><nowiki>{{tl|hide|title=title|content=text}}</nowiki></code> | ||
: | :Result: {{tl|hide|<nowiki>title=title|content=text</nowiki>}} | ||
== | == Notes == | ||
* | *This template can only link to content within the {{color|blue|Template:}} namespace. Therefore, the links generated using this template will automatically prepend the <code>Template:</code> prefix. | ||
== | == See Also == | ||
* {{tl|Para}} | * {{tl|Para}} | ||
* {{tl|Param}} | * {{tl|Param}} | ||
Line 31: | Line 31: | ||
<includeonly> | <includeonly> | ||
<!-- | <!-- Template categorization/interlanguage links --> | ||
[[Category: | [[Category:Link templates]] | ||
[[en:Template:Template link]] | [[en:Template:Template link]] | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
<!-- | <!-- Documentation categorization/interlanguage links --> | ||
[[ | [[zh:Template:Template link/doc]] | ||
[[Category: | [[Category:Template Documentation]] | ||
</noinclude> | </noinclude> |
Revision as of 19:51, 13 January 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}}