Template:T/doc: Difference between revisions
Created page with "{{Documentation/Header}} {{Lua|Formatting}} {{Main|Template:F}} This template creates a fake template call in the form of how it would look in wikitext in source editor. ==Syntax== See Template Data for extra functions.<br /> {{T|T|v1=Template Name|v2=v((#))=Variable Input|v3=p((#))=Fixed Input|v4=P((#))=Fixed Input with "let_parse" functionality|v5=Fixed Input|p6=_Y_=1}} * Direct usage of named parameters is allowed but they will be displayed at a ra..." |
No edit summary |
||
| Line 23: | Line 23: | ||
;With Parameter | ;With Parameter | ||
{{T|T|Card| | {{T|T|Card|Tony}} yields: {{T|Card|Tony}}<br /> | ||
{{T|T|Card| | {{T|T|Card|Carrier}} yields: {{T|Card|Carrier}} | ||
;With Multiple Parameters | ;With Multiple Parameters | ||
{{T|T|p1=Card|p2=p1= | {{T|T|p1=Card|p2=p1=Tony|p3=v2=up=1}} yields: {{T|Card|p1=Tony|p2=up=1}}<br /> | ||
{{T|T|p1=Item|p2=p1= | {{T|T|p1=Item|p2=p1=Carrier|p3=v2=x=amount of the item}} yields: {{T|Item|p1=Carrier|v2=x=amount of carriers}} | ||
<!-- | <!-- | ||
Latest revision as of 09:23, 10 June 2025
This is the documentation page for T. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
This template creates a fake template call in the form of how it would look in wikitext in source editor.
Syntax
See Template Data for extra functions.
{{T|Template Name|v# = Variable Input|p# = Fixed Input|P# = Fixed Input with "let_parse" functionality|Fixed Input|_Y_ = 1}}
- Direct usage of named parameters is allowed but they will be displayed at a random order and always after any and all parameters with specified order, to specify an order please use p#, P# or v#
- Add
(())around any string to give it variable formatting - block — display the template code in block formatting
- NC — display the template code outside <code> formatting
- let_parse — allow parsing of input as to allow for custom placed <nowiki> tags
- _Y_ — include to automatically display the expected input with the parameters given
- no_joint — remove the yield: text from the string that joins the fake template call and the yield (removed by default on Infobox Templates)
- _Ybr_ — same functionality but adds a forced line break after the yields: for those templates that require to be on a line of their own.
- _Yn_ — same functionality but adds a line break after the yields: for those templates that require to be on a line of their own but do not allow for artificial line break.
Examples
- Without Parameters
{{T|Card}} yields: {{Card}}
{{T|Item}} yields: {{Item}}
- With Parameter
{{T|Card|Tony}} yields: {{Card|Tony}}
{{T|Card|Carrier}} yields: {{Card|Carrier}}
- With Multiple Parameters
{{T|Card|p1 = Tony|v2 = up=1}} yields: {{Card|Tony|up = 1}}
{{T|Item|p1 = Carrier|v2 = x=amount of the item}} yields: {{Item|Carrier|x = amount of carriers}}
- Block Format
{{T|Item|p1 = Dennies|v2 = x=amount of the item|block = 1}} yields:
{{Item
|Dennies
|x = amount of the item
}}
Template Data
Template for displaying fake template calls as they would show in source editor mode.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Template | text 1 | Name of the template to make a fake call to | String | required |
| Variable Input | v# | To be used to indicate that the true template call is expected to replace the given value by appropriate text, replace "#" by the number of the parameter to be represented | String | suggested |
| Fixed Input with let_parse | p# | To be used to indicate that the true template call should use the value indicated as-is, while allowing the input text to be parsed as wikitext before being passed into the module, replace "#" by the number of the parameter to be represented | String | suggested |
| Fixed Input (Parsed) | P# | To be used to indicate that the true template call should use the value indicated as-is while parsing the input to allow for the usage of html tags inside it, like <nowiki>, replace "#" by the number of the parameter to be represented | String | suggested |
| Block Formatting | block | Option for using proper code blocks instead of inline code tags. | Boolean | optional |
| Bold | bold b | Option for bold formatting. | Boolean | optional |
| Italic | italic i | Option for italic formatting. | Boolean | optional |
| Underline | underline u | Option for underline formatting. | Boolean | optional |
| Ref Tag | ref r | Option for adding <ref></ref> tags. | Boolean | optional |
| No Code | NC | Option for disabling the <code> formatting. | Boolean | optional |
| Call Template | _Y_ | Option to call the template with the given parameters and include its output. | Boolean | suggested |
| Call Template with <br> | _Ybr_ | Option to call the template with the given parameters and include its result prefixed with a line break. | Boolean | optional |
| Call Template with \n | _Yn_ | Option to call the template with the given parameters and include its result on a new line. | Boolean | optional |
| Link | link l | Option to format as a [[Link]]. | Boolean | optional |
| External Link | external-link el | Option to format as an external link. | Boolean | optional |
| Plaintext | nowiki nw | Option to wrap the results in a <nowiki> tag, preventing any wikitext formatting. | Boolean | optional |