Template:TDInfo

From Jobexi League Wiki
Jump to navigation Jump to search
Template-info.svg Documentation Edit this documentation at Template:TDInfo/doc.

Empty Root Template

The Root Template Page (TDInfo) does not contain any Template code to use. Instead should the below listed sub-page templates be used.

This Template hosts a collection of sub-page templates meant to ease the creation of Template documentation, namely creating the Usage structure and Parameter list.

TDInfo/Usage

This template is used to show the "Usage" section with a code block depicting the usage of the Template.

Usage

{{TDInfo/Usage
| 1-15 = [ Template:TDInfo/Argument ]
| inline = [ Boolean ]
| h3 = [ Boolean ]
| name = [ String ]
}}

Parameters

Parameter Type Required Description Default
1-15 Template:TDInfo/Argument No Each parameter is a Template:TDInfo/Argument instance holding information about the argument. See the TDInfo/Argument section below for more details. None
inline Boolean No Wether the arguments should all be shown in one line or not. No
h3 Boolean No Wether the "Usage" header should be a H3 header or a H2. No
name String No When set, overrides the Template name displayed. {{ROOTPAGENAME}}

TDInfo/Table

This template is used to show the "Parameters" section with a table showing the parameter name, type, whether it is required or not, description and default returned.

Usage

{{TDInfo/Table
| 1-15 = [ Template:TDInfo/TableRow ]
| h3 = [ Boolean ]
}}

Parameters

Parameter Type Required Description Default
1-15 Template:TDInfo/TableRow No Each parameter is a Template:TDInfo/TableRow instance holding information about the parameter. See the TDInfo/TableRow section below for more details. None
h3 Boolean No Wether the "Parameters" header should be a H3 header or a H2. No

TDInfo/Argument

This template is used inside the TDInfo/Usage template as an argument, to set the information to display.

Usage

{{TDInfo/Argument|[ String ]|[ String ]|[ Boolean ]}}

Parameters

Parameter Type Required Description Default
1 String No Name of the argument. If left empty will {{{1}}} = not be displayed. None
2 String No The Argument Type. When set to boolean (case-insensitive) will it be converted to Boolean. String
3 Boolean No Wether this argument is required or not. Changes the brackets around the argument type to <> if required or otherwise []. No

TDInfo/TableRow

This template is used inside the TDInfo/Table template as an argument, to set table rows to display.

Usage

{{TDInfo/TableRow|[ String ]|[ String ]|[ Boolean ]|[ String ]|[ String ]}}

Parameters

Parameter Type Required Description Default
1 String No Name of the argument <span style="color: #919191;">''Argument not set''</span>
2 String No The Argument Type. When set to boolean (case-insensitive) will it be converted to Boolean. String
3 Boolean No Wether the parameter is required or not. No
4 String No The description of this parameter. <span style="color: #919191;">''No Description provided''</span>
5 String No The default value this parameter may return <span style="color: #919191;">''None''</span>