Template:Template link: Difference between revisions

From Vintage Story Wiki
m (Sana moved page Template:Tl to Template:Template link)
(Fix "code" parameter)
 
Line 1: Line 1:
<includeonly>{{#if:{{yesno|{{{code|yes}}}}}|<code>}}{{{{#if: {{{subst|}}}|[[WP:SUBSTITUTION|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|}}} | {{!}}{{{4|}}} }}{{ #if: {{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}} | {{!}}{{{5|}}} }}{{ #if: {{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}} | {{!}}{{{6|}}} }}{{ #if: {{{7|}}}{{{8|}}}{{{9|}}} | {{!}}{{{7|}}} }}{{ #if: {{{8|}}}{{{9|}}} | {{!}}{{{8|}}} }}{{ #if: {{{9|}}} | {{!}}{{{9|}}} }}}}{{#if:{{yesno|{{{code|yes}}}}}|</code>}}{{#if: {{#pos: {{{1}}} | File: }}{{#pos: {{{1}}} | Category: }} | [[Category:Fixme]] }}</includeonly><noinclude>
<includeonly>{{#ifeq:{{{code|}}}|no||<code>}}{{{{#if: {{{subst|}}}|[[WP:SUBSTITUTION|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|}}} | {{!}}{{{4|}}} }}{{ #if: {{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}} | {{!}}{{{5|}}} }}{{ #if: {{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}} | {{!}}{{{6|}}} }}{{ #if: {{{7|}}}{{{8|}}}{{{9|}}} | {{!}}{{{7|}}} }}{{ #if: {{{8|}}}{{{9|}}} | {{!}}{{{8|}}} }}{{ #if: {{{9|}}} | {{!}}{{{9|}}} }}}}{{#ifeq:{{{code|}}}|no||</code>}}{{#if: {{#pos: {{{1}}} | File: }}{{#pos: {{{1}}} | Category: }} | [[Category:Fixme]] }}</includeonly><noinclude>
<!-- categories/interwikis on the /doc subpage, not here -->
<!-- categories/interwikis on the /doc subpage, not here -->
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 17:41, 8 December 2023


[view | edit | history | purge this page]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}}

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. Note that ='s must be escaped using {{=}}

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.

Set |code to no to disable code formatting.

Examples

  • {{tl|Icon link}}{{Icon link}}
  • {{tl|Template:Infobox|subst=yes}}{{subst:Infobox}}
  • {{tl|move|Page to move to|Optional reason}}{{move|Page to move to|Optional reason}}
  • {{tl|Delete|reason|subst=1}}{{Delete|reason|subst=1}}
[view | edit | history | purge this page]The above documentation is transcluded from Template:Template link/doc.