Template:TemplateLink: Difference between revisions

From Structorica Wiki
Jump to navigation Jump to search
Created page with "<includeonly>{{#if:{{yesno|{{{code|yes}}}}}|<code>}}{{{{#if: {{{subst|}}}|subst: }}[[{{#if: {{#pos: {{{1}}} | : }} || Template: }}{{{1}}}|{{ #ifeq: {{NAMESPACE:{{{1}}}}} | Template | {{PAGENAME:{{{1}}}}} | {{{1}}} }}]]{{ #if: {{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}} | {{!}}{{{2|}}} }}{{ #if: {{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}} | {{!}}{{{3|}}} }}{{ #if: {{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}} | {{!}..."
 
No edit summary
Line 17: Line 17:


== Examples ==
== Examples ==
* {{tcode|tl|OS}} → {{tl|OS}}
* {{tcode|tl|-}} → {{tl|-}}
* {{tcode|tl|Template:Welcome|subst{{=}}yes}} → {{tl|Template:Welcome|subst=yes}}
* {{tcode|tl|Template:Welcome|subst{{=}}yes}} → {{tl|Template:Welcome|subst=yes}}
* {{tcode|tl|move|Page to move to|Optional reason}} → {{tl|move|Page to move to|Optional reason}}
* {{tcode|tl|move|Page to move to|Optional reason}} → {{tl|move|Page to move to|Optional reason}}
Line 29: Line 29:
[[Category:Link templates]]
[[Category:Link templates]]


[[ru:Шаблон:Ссылка на шаблон]]
[[ru:Template:Ссылка на шаблон]]
</noinclude>
</noinclude>

Revision as of 17:34, 15 January 2026

Documentation

Shortcut

This template is used to easily link to a template, while displaying the template brackets.

Usage

{{tl|template name|subst=yes/no|code=yes/no}}

The |template name= can be any page, using the same conventions as transclusion. Basically the "Template:" prefix is optional, and a colon is required to link the main space.

Parameters can also be added, to a maximum of 8.

The |subst= parameter will determine whether the template link will display as a substed template or not. If the subst parameter is set, it will display the word "subst:" in front of the template link.

If you set the |code= parameter to |, the template text will be formatted similar to the <code> tag or the {{TemplateCode}} template.

Examples

  • {{tl|-}}{{-}}
  • {{tl|Template:Welcome|subst=yes}}{{subst:Welcome}}
  • {{tl|move|Page to move to|Optional reason}}{{move|Page to move to|Optional reason}}
  • {{tl|uw-vandalism|Structorica|subst=1}}{{subst:Uw-vandalism|Structorica}}

See also