Template:T: Difference between revisions

From The Reed and Rite
mNo edit summary
mNo edit summary
Line 22: Line 22:
|-
|-
| style="text-align: center; background-color: white;" |<pre>
| style="text-align: center; background-color: white;" |<pre>
{{t|TEMPLATENAME}}
{{t|Example}}
</pre>
</pre>
| style="background-color: white; text-align: center;" |{{t|TEMPLATENAME}}
| style="background-color: white; text-align: center;" |{{t|Example}}
|-
|-
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Unnamed Parameter</span><br><span style="font-weight: normal;">To demonstrate unnamed parameters, simply pass the input.</span>
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Unnamed Parameter</span><br><span style="font-weight: normal;">To demonstrate unnamed parameters, simply pass the input.</span>
Line 33: Line 33:
| style="text-align: left; background-color: white;" |<pre>
| style="text-align: left; background-color: white;" |<pre>
{{t
{{t
|TEMPLATENAME
|Example
|PARAMETER1
|PARAMETER1
|PARAMETER2
|PARAMETER2
Line 39: Line 39:
}}
}}
</pre>
</pre>
| style="background-color: white; text-align: center;" |{{t|TEMPLATENAME|PARAMETER1|PARAMETER2|PARAMETER3}}
| style="background-color: white; text-align: center;" |{{t|Example|PARAMETER1|PARAMETER2|PARAMETER3}}
|-
|-
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Named Parameter</span><br><span style="font-weight: normal;">Named parameters will not appear in the output if passed using <code>=</code>.</span>
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Named Parameter</span><br><span style="font-weight: normal;">Named parameters will not appear in the output if passed using <code>=</code>.<br>You can pass named parameters in one of three ways:<br>1. Use unicode equals sign (<code>&#<span>61</span>;</code>) instead of <code>=</code>.<br>2. Surround the parameters in a <code>&lt;nowiki&gt;</code> tag.<br> 3. Use correctly numbered parameters.</span>
|-
|-
! colspan="2" style="text-align: center;" |You Type
! colspan="2" | You Type
|-
|-
| colspan="2" style="text-align: center; background-color: white;" |<pre>
| colspan="2" style="background-color:white"|
{{t|TEMPLATENAME|PARAMETER1|PARAMETER2}}
{| style="border: none; border-collapse: collapse; width: 100%;"
| style="border: none; width: 33%;" | <pre>
 
{{t
|Example
|name&#38;#61;INPUT
|date&#38;#61;INPUT
|location&#38;#61;INPUT
}}
 
</pre>
| style="border: none; width:33%;" | <pre>
{{t
|Example
&lt;nowiki&gt;
|name=INPUT
|date=INPUT
|location=INPUT
&lt;/nowiki&gt;
}}
</pre>
</pre>
| style="border: none; width:33%;" | <pre>
{{t
|Example
|2=name=INPUT
|3=date=INPUT
|4=location=INPUT
}}
</pre>
|}
|-
|-
! colspan="2" style="text-align: center;" |You Get
! colspan="2" | You Get
|-
|-
| colspan="2" style="background-color: white; text-align: center;" |{{t|TEMPLATENAME|PARAMETER1|PARAMETER2||PARAMETER3}}
| colspan="2" style="background-color: white; text-align: center;"|{{t|Example|name&#61;INPUT|date&#61;INPUT |location&#61;INPUT}}
|}
|}


To pass named parameters, you can  
To pass named parameters, you can  

Revision as of 01:54, 18 April 2025

Description

This template is used to provide stylized formatting to template displays without actually using the template itself. It will provide a link to that template's page in the Template namespace. Most commonly, this template is used for demonstrative or linking purposes in the Help Guide or on a Template's Description page.

Usage

Default Usage
To simply create a link to a template, pass the template name.
You Type You Get
{{t|Example}}
{{Example}}
Unnamed Parameter
To demonstrate unnamed parameters, simply pass the input.
You Type You Get
{{t
|Example
|PARAMETER1
|PARAMETER2
|PARAMETER3
}}
{{Example|PARAMETER1|PARAMETER2|PARAMETER3}}
Named Parameter
Named parameters will not appear in the output if passed using =.
You can pass named parameters in one of three ways:
1. Use unicode equals sign (&#61;) instead of =.
2. Surround the parameters in a <nowiki> tag.
3. Use correctly numbered parameters.
You Type

{{t
|Example
|name&#61;INPUT
|date&#61;INPUT
|location&#61;INPUT
}}

{{t
|Example
<nowiki>
|name=INPUT
|date=INPUT
|location=INPUT
</nowiki>
}}

{{t
|Example
|2=name=INPUT
|3=date=INPUT
|4=location=INPUT
}}

You Get
{{Example|name=INPUT|date=INPUT|location=INPUT}}

To pass named parameters, you can

  • use name &#61; value — {{t|Rosharan numeric date|year &#61; 1172|month &#61; 5|week &#61; 10|day &#61; 6}};
  • surround it in <nowiki /> tags — {{t|Rosharan numeric date|<nowiki>year=1172|month=5|week=1|day=6</nowiki>}}; or
  • use correctly numbered parameters.

{{Character|name=INPUT}}

Pages using Template