Template:Param2: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{type|{{data|{{{name}}}|function{{{func}}}.param{{{param}}}.type}}}}{{ | <includeonly>{{ | ||
#if: {{data|{{{name}}}|function{{{func}}}.param{{{param}}}.optional}} | |||
|<nowiki>[</nowiki> }}{{ | |||
type|{{data|{{{name}}}|function{{{func}}}.param{{{param}}}.type}}}}{{ | |||
#ifeq: {{{format}}} | signature || {{ | #ifeq: {{{format}}} | signature || {{ | ||
#if: {{data|{{{name}}}|function{{{func}}}.param{{{param}}}}} | #if: {{data|{{{name}}}|function{{{func}}}.param{{{param}}}}} | ||
| {{Pspan|{{data|{{{name}}}|function{{{func}}}.param{{{param}}}}}}}{{ | | {{Pspan|{{data|{{{name}}}|function{{{func}}}.param{{{param}}}}}}}{{ | ||
#if: {{data|{{{name}}}|function{{{func}}}.param{{{param}}}.default}} | #if: {{data|{{{name}}}|function{{{func}}}.param{{{param}}}.default}} | ||
| = {{data|{{{name}}}|function{{{func}}}.param{{{param}}}.default}}}}}}}}</includeonly><noinclude> | | = {{data|{{{name}}}|function{{{func}}}.param{{{param}}}.default}}}}}}}}{{ | ||
#if: {{data|{{{name}}}|function{{{func}}}.param{{{param}}}.optional}} | |||
| <nowiki>]</nowiki>}}</includeonly><noinclude> | |||
<templatedata> | <templatedata> |
Revision as of 22:49, 18 December 2020
Despite the similar name, this is completely different from [[Template:Param]].
Parameter | Description | Type | Status | |
---|---|---|---|---|
Function page name | name | Name of a function page. '''This must be a data page.''' | Page name | required |
Overloaded function number | func | A function page may describe multiple overloaded functions under the same name. This parameter allows you to select one. Allowed values are 1-5, inclusive. | Number | required |
Parameter number | param | Specify which parameter to extract. Allowed values are 1-5, inclusive. | Number | required |
Rendering format | format | "" (empty string) = show everything, "signature" = only show parameter types (i.e. function signature). Default value is empty string (show everything). | Line | optional |
Examples
Types and parameters
*{{param2|name=User:Philmasterplus/Sandbox|func=1|param=1}} *{{param2|name=User:Philmasterplus/Sandbox|func=2|param=1}} *{{param2|name=User:Philmasterplus/Sandbox|func=2|param=2}} *{{param2|name=User:Philmasterplus/Sandbox|func=2|param=3}}
- [ Nothing to see here, move along. Nothing to see here, move along. = Nothing to see here, move along. ]
- [ Nothing to see here, move along. Nothing to see here, move along. = Nothing to see here, move along. ]
- [ Nothing to see here, move along. Nothing to see here, move along. = Nothing to see here, move along. ]
- [ Nothing to see here, move along. Nothing to see here, move along. = Nothing to see here, move along. ]
Types only
*{{param2|name=User:Philmasterplus/Sandbox|func=1|param=1|format=signature}} *{{param2|name=User:Philmasterplus/Sandbox|func=2|param=1|format=signature}} *{{param2|name=User:Philmasterplus/Sandbox|func=2|param=2|format=signature}} *{{param2|name=User:Philmasterplus/Sandbox|func=2|param=3|format=signature}}
- [ Nothing to see here, move along. ]
- [ Nothing to see here, move along. ]
- [ Nothing to see here, move along. ]
- [ Nothing to see here, move along. ]