Template:T: Difference between revisions
mNo edit summary |
m Removed background color to allow dynamic color shift in dark mode. |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 16: | Line 16: | ||
{| style="width: 100%; text-align: left; margin: left;" class="wikitable" | {| style="width: 100%; text-align: left; margin: left;" class="wikitable" | ||
|- | |- | ||
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;"> | ! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Template Link</span><br><span style="font-weight: normal;">To simply create a link to a template, pass the template's name.</span> | ||
|- | |- | ||
! width=25%|You Type | ! width=25%|You Type | ||
!You Get | !You Get | ||
|- | |- | ||
| style="text-align: center | | style="text-align: center;" |<pre> | ||
{{t|Example}} | {{t|Example}} | ||
</pre> | </pre> | ||
| style=" | | style="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 31: | Line 31: | ||
!You Get | !You Get | ||
|- | |- | ||
| style="text-align: left | | style="text-align: left;" |<pre> | ||
{{t | {{t | ||
|Example | |Example | ||
| Line 39: | Line 39: | ||
}} | }} | ||
</pre> | </pre> | ||
| style=" | | style="text-align: center;" |{{t|Example|PARAMETER1|PARAMETER2|PARAMETER3}} | ||
|- | |- | ||
! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Named Parameter</span><span style="font-weight: normal;"><br>Named parameters will not appear in the output if passed using <code>=</code>.<br>You can pass named parameters in one of three ways:</span> | ! colspan="2" style="text-align: center;" | <span style="font-size: 115%;">Named Parameter</span><span style="font-weight: normal;"><br>Named parameters will not appear in the output if passed only using <code>=</code>.<br>You can pass named parameters in one of three ways:</span> | ||
|- | |- | ||
! colspan="2" | You Type | ! colspan="2" | You Type | ||
|- | |- | ||
| colspan="2" style=" | | colspan="2" style="text-align: center;"|<span style="display: block; text-align: left;">1. Use a unicode equals sign (<code>&#<span>61</span>;</code>) instead of <code>=</code>:</span> | ||
<div style="width: | <div style="width: 65%; margin: 0 auto;"><pre>{{t|Example|name&#61;INPUT|date&#61;INPUT|location&#61;INPUT}}</pre></div> | ||
|- | |- | ||
| colspan="2" style=" | | colspan="2" style="text-align: center;"|<span style="display: block; text-align: left;">2. Surround the parameters in a <code><nowiki></code> tag:</span> | ||
<div style="width: | <div style="width: 65%; margin: 0 auto;"><pre>{{t|Example<nowiki>|name=INPUT|date=INPUT|location=INPUT</nowiki>}}</pre></div> | ||
|- | |- | ||
| colspan="2" style=" | | colspan="2" style="text-align: center;"|<span style="display: block; text-align: left;">3. Use correctly numbered parameters, i.e., <code>2=</code>, <code>3=</code>, etc.:</span> | ||
<div style="width: | <div style="width: 65%; margin: 0 auto;"><pre>{{t|Example|2=name=INPUT|3=date=INPUT|4=location=INPUT}}</pre></div> | ||
|- | |- | ||
! colspan="2" | You Get | ! colspan="2" | You Get | ||
|- | |- | ||
| colspan="2" style=" | | colspan="2" style="text-align: center;"|<div> | ||
{{t|Example|name=INPUT|date=INPUT|location=INPUT}} | {{t|Example|name=INPUT|date=INPUT|location=INPUT}} | ||
</div> | </div> | ||
| Line 66: | Line 66: | ||
{{Special:WhatLinksHere/{{FULLPAGENAME}}|limit=100}} | {{Special:WhatLinksHere/{{FULLPAGENAME}}|limit=100}} | ||
[[Category:Administrative Templates]] | |||
[[Category: Templates]] | |||