Template:Modulo/doc
Chësta ie na plata de documentazion per Template:Modulo. Tlo abines nfurmazions sun co adurvé categories y auter contenuto che ne ie nia pert dl template uriginel template page. |
This template uses Lua: |
Template:Lt is used to display a module name as a link surrounded by braces with the {{#invoke}} parser function, thus showing the module name as code rather than actually invoking it. Its primary use is in instruction and documentation where it is used to refer to a module by name without invoking it. It is also supports the definition of a function and parameters.
Examples
[muda l codesc]Code | Result | Notes |
---|---|---|
{{ml|Example}}
|
{{#invoke:Example|function}} | Usage without function name. This does not produce a usable invocation. |
{{ml|Example|hello}}
|
{{#invoke:Example|hello}} | Usage with a function name. |
{{ml|Example|count_fruit|4=bananas=10|5=kiwis=5}}
|
{{#invoke:Example|count_fruit|bananas=10|kiwis=5}} | Usage with a function name and parameters. |
{{ml|Example|count_fruit|Fred|bananas{{=}}10|apples{{=}}5}}
|
{{#invoke:Example|count_fruit|Fred|bananas=10|apples=5}} | Usage with a function name and parameters, using {{=}}. |
{{ml|Example|}}
|
{{#invoke:Example}} | Omits the function name |
TemplateData
[muda l codesc]TemplateData for Modulo
This template displays a module name as a link surrounded by braces with the {{#invoke}} parser function, thus showing how the module name would be used in code. Its primary use is in instruction and documentation.
Parametro | Descrizione | Tipo | Stato | |
---|---|---|---|---|
module name | 1 | the module name without the namespace prefix “Module:”, which is added automatically | Stringa | obbligatorio |
function name | 2 | the function name within the module to call | Stringa | obbligatorio |
parameter 1 | 3 | the name (and value) of the first parameter, use {{=}} to add an equal sign | Stringa | facoltativo |
parameter 2 | 4 | the name (and value) of the second parameter, use {{=}} to add an equal sign | Stringa | facoltativo |
parameter 3 | 5 | the name (and value) of the third parameter, use {{=}} to add an equal sign | Stringa | facoltativo |
See also
[muda l codesc]- {{mlx}} - Similar function but surrounded in
<code>...</code>
tags. - {{tl}} - A version of this template for templates instead of modules.
Template:Template-linking templates