Template:T: Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) m (Easier) Tag: New redirect |
(New unified code) Tag: Removed redirect |
||
Line 1: | Line 1: | ||
# | <includeonly><onlyinclude><code style="padding:0; white-space:pre-wrap">{{{{#if:{{{1|}}}|[[Template:{{{1|}}}|{{{1|}}}]]}}{{{2|}}}}}</code></onlyinclude></includeonly> | ||
{{ | This Template used to display a template name as a link (or plain text) surrounded by braces, thus showing how the template name would be used in code. | ||
== Examples == | |||
{{Code|{{T|T}}}} → {{T}} | |||
{{Code|{{T|T|{{P|Test}}}}}} → {{T|Test}} | |||
{{Code|{{T|T|{{P}}{{P|Test}}}}}} → {{T||Test}} | |||
{{Code|{{T|T|{{P|Test}}{{P}}{{T|P|{{P|Some Text}}}}}}}} → {{T|Test|{{P|Some Text}}}} | |||
{{Code|{{T|T|{{P}}{{P|Test}}{{T|P|{{P|Some Text}}}}}}}} → {{T||Test{{P|Some Text}}}} | |||
{{Code|{{T|T|{{P|Test}}{{P}}{{T|P|{{P|param}}{{P|10}}}}}}}} → {{T|Test|{{P|param|10}}}} | |||
{{Code|{{T|T|{{P|&#61;}}}}}} → {{T|=}} | |||
{{Code|{{T|T|{{P|!}}}}}} → {{T|!}} | |||
== Multiline support == | |||
{{CodeBlock|<nowiki>{{T|Test| | |||
{{P| Unnamed param}} | |||
{{P| empty |}} | |||
{{P| param | 8}} | |||
}}</nowiki>}} | |||
→ | |||
{{T|Test| | |||
{{P| Unnamed param}} | |||
{{P| empty |}} | |||
{{P| param | 8}} | |||
}} | |||
==== Without link ==== | |||
{{CodeBlock|<nowiki>{{T||Test | |||
{{P| Unnamed param}} | |||
{{P| empty |}} | |||
{{P| param | 8}} | |||
}}</nowiki>}} | |||
→ | |||
{{T||Test | |||
{{P| Unnamed param}} | |||
{{P| empty |}} | |||
{{P| param | 8}} | |||
}} |
Revision as of 12:52, 19 June 2024
This Template used to display a template name as a link (or plain text) surrounded by braces, thus showing how the template name would be used in code.
Examples
{{T}}
→ {{}}
{{T||Test}}
→ {{Test}}
{{T|Test|
→ {{P|Some Text}}
}}{{Test|Some Text}}
{{T||Test
→ {{P|Some Text}}
}}{{Test|Some Text}}
{{T|Test|
→ {{P|param|10}}
}}{{Test|param=10}}
Multiline support
→
{{Test
| Unnamed param
| empty =
| param = 8
}}
Without link
→
{{Test
| Unnamed param
| empty =
| param = 8
}}