Template:Function2: Difference between revisions
No edit summary |
No edit summary |
||
Line 126: | Line 126: | ||
Use this as the starting point for a data-driven function page: | Use this as the starting point for a data-driven function page: | ||
<pre> | |||
<onlyinclude>{{{{{format|Function2}}} | |||
|name= | |name= | ||
|function1.return_type= | |function1.return_type= | ||
Line 266: | Line 265: | ||
|function5.param5.description= | |function5.param5.description= | ||
|description= | |description= | ||
|code1= | |code1={{CodeSample | ||
|title=Code Samples | |title=Code Samples | ||
|description=Visits your private character sheet. | |description=Visits your private character sheet. | ||
Line 272: | Line 271: | ||
|moreinfo= | |moreinfo= | ||
}} | }} | ||
|code2= | |code2={{CodeSample | ||
|description=Visits your private character sheet. | |description=Visits your private character sheet. | ||
|code= | |code= | ||
|moreinfo= | |moreinfo= | ||
}} | }} | ||
|code3= | |code3={{CodeSample | ||
|description=Visits your private character sheet. | |description=Visits your private character sheet. | ||
|code= | |code= | ||
|moreinfo= | |moreinfo= | ||
}} | }} | ||
|code4= | |code4={{CodeSample | ||
|description=Visits your private character sheet. | |description=Visits your private character sheet. | ||
|code= | |code= | ||
|moreinfo= | |moreinfo= | ||
}} | }} | ||
|code5= | |code5={{CodeSample | ||
|description=Visits your private character sheet. | |description=Visits your private character sheet. | ||
|code= | |code= | ||
|moreinfo= | |moreinfo= | ||
}} | }} | ||
|see_also= | |see_also={{SeeAlso|}} | ||
|cli_equiv= | |cli_equiv= | ||
|more_info= | |more_info= | ||
|special= | |special= | ||
| | |{{{1|}}} | ||
}} | }}</onlyinclude> | ||
<!-- Add an appropriate function subcategory here, e.g. [[Category:Adventuring]], | |||
then delete this comment -- | then delete this comment --> | ||
</pre> | |||
Data-driven function pages are incompatible with old-style function pages (i.e. ones that use [[Template:FunctionPage]]). | Data-driven function pages are incompatible with old-style function pages (i.e. ones that use [[Template:FunctionPage]]). | ||
</noinclude> | </noinclude> |
Revision as of 11:53, 20 December 2020
Replacement for Template:FunctionPage. Must be used with data-driven function pages.
Parameter | Description | Type | Status | |
---|---|---|---|---|
ASH function name | name | Name of the ASH function. This should match the function page name.
| Line | required |
Description | description | Long description that covers all functions. Note: Use <p></p> to separate paragraphs, because double line breaks don't work | Content | required |
Function 1, description | function1.description | Short description for the overloaded function 1 (and so on for functions 2 through 3)
| Content | required |
Function 1, return type | function1.return_type | Return type of the overloaded function 1.
| Line | required |
Function 1, parameter 1 | function1.param1 | Name of the parameter 1 of the overloaded function 1 (and so on for parameters 2 through 5).
| Line | optional |
Function 1, parameter 1 description | function1.param1.description | Description of parameter 1 of the overloaded function 1.
| Content | optional |
Function 1, parameter 1 is optional? | function1.param1.optional | "yes" = optional. Any non-empty string will do, but please use "yes" to make standardization easier.
| Line | optional |
Function 1, parameter 1 default value | function1.param1.default | If this is specified, function1.param1.optional must be "yes"
| Line | optional |
Example code 1 | code1 | Example code showing how to use this function. Use [[Template:CodeSample]] to create sample code. (Same for code2 through code5) | Content | optional |
Equivalent gCLI command | cli_equiv | If provided, must be a gCLI command that provides functionality equivalent to this function. | Line | optional |
See Also section | see_also | If provided, this is used as the content for the See Also section. Use [[Template:SeeAlso]] to build a See Also section. | Content | optional |
More Information section | more_info | If provided, this is used as the content for the More Information section | Content | optional |
Special section | special | If provided, this is used as the content for the Special section | Content | optional |
Needs code samples? | needscode | If set to "yes", adds a "needs code samples" banner and categorizes the page under [[Category:Needs Code Sample]]. | Line | optional |
Needs improved code samples? | improvecode | If set to "yes", adds a "needs better code samples" banner and categorizes the page under [[Category:Needs Code Sample]]. | Line | optional |
Notes
This template is not meant to be used directly, but rather through the use of
{{{format|User:Philmasterplus/TemplateSandbox2}}}
in a data-driven function page.
Use this as the starting point for a data-driven function page:
<onlyinclude>{{{{{format|Function2}}} |name= |function1.return_type= |function1.description= |function1.param1= |function1.param1.type= |function1.param2.optional= |function1.param2.default= |function1.param1.description= |function1.param2= |function1.param2.type= |function1.param2.optional= |function1.param2.default= |function1.param2.description= |function1.param3= |function1.param3.type= |function1.param3.optional= |function1.param3.default= |function1.param3.description= |function1.param4= |function1.param4.type= |function1.param4.optional= |function1.param4.default= |function1.param4.description= |function1.param5= |function1.param5.type= |function1.param5.optional= |function1.param5.default= |function1.param5.description= |function2.return_type= |function2.description= |function2.param1= |function2.param1.type= |function2.param2.optional= |function2.param2.default= |function2.param1.description= |function2.param2= |function2.param2.type= |function2.param2.optional= |function2.param2.default= |function2.param2.description= |function2.param3= |function2.param3.type= |function2.param3.optional= |function2.param3.default= |function2.param3.description= |function2.param4= |function2.param4.type= |function2.param4.optional= |function2.param4.default= |function2.param4.description= |function2.param5= |function2.param5.type= |function2.param5.optional= |function2.param5.default= |function2.param5.description= |function3.return_type= |function3.description= |function3.param1= |function3.param1.type= |function3.param2.optional= |function3.param2.default= |function3.param1.description= |function3.param2= |function3.param2.type= |function3.param2.optional= |function3.param2.default= |function3.param2.description= |function3.param3= |function3.param3.type= |function3.param3.optional= |function3.param3.default= |function3.param3.description= |function3.param4= |function3.param4.type= |function3.param4.optional= |function3.param4.default= |function3.param4.description= |function3.param5= |function3.param5.type= |function3.param5.optional= |function3.param5.default= |function3.param5.description= |function4.return_type= |function4.description= |function4.param1= |function4.param1.type= |function4.param2.optional= |function4.param2.default= |function4.param1.description= |function4.param2= |function4.param2.type= |function4.param2.optional= |function4.param2.default= |function4.param2.description= |function4.param3= |function4.param3.type= |function4.param3.optional= |function4.param3.default= |function4.param3.description= |function4.param4= |function4.param4.type= |function4.param4.optional= |function4.param4.default= |function4.param4.description= |function4.param5= |function4.param5.type= |function4.param5.optional= |function4.param5.default= |function4.param5.description= |function5.return_type= |function5.description= |function5.param1= |function5.param1.type= |function5.param2.optional= |function5.param2.default= |function5.param1.description= |function5.param2= |function5.param2.type= |function5.param2.optional= |function5.param2.default= |function5.param2.description= |function5.param3= |function5.param3.type= |function5.param3.optional= |function5.param3.default= |function5.param3.description= |function5.param4= |function5.param4.type= |function5.param4.optional= |function5.param4.default= |function5.param4.description= |function5.param5= |function5.param5.type= |function5.param5.optional= |function5.param5.default= |function5.param5.description= |description= |code1={{CodeSample |title=Code Samples |description=Visits your private character sheet. |code= |moreinfo= }} |code2={{CodeSample |description=Visits your private character sheet. |code= |moreinfo= }} |code3={{CodeSample |description=Visits your private character sheet. |code= |moreinfo= }} |code4={{CodeSample |description=Visits your private character sheet. |code= |moreinfo= }} |code5={{CodeSample |description=Visits your private character sheet. |code= |moreinfo= }} |see_also={{SeeAlso|}} |cli_equiv= |more_info= |special= |{{{1|}}} }}</onlyinclude> <!-- Add an appropriate function subcategory here, e.g. [[Category:Adventuring]], then delete this comment -->
Data-driven function pages are incompatible with old-style function pages (i.e. ones that use Template:FunctionPage).