More actions
Created page with "{{Documentation subpage}} {{tsh|mlx}}{{lua|Module:Separated entries}} {{lt|module link expanded}} (often abbreviated <nowiki>{{mlx}}</nowiki>) 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 t..." |
No edit summary |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{wikipedia|page name}} | |||
{{Documentation subpage}} | {{Documentation subpage}} | ||
{{tsh|mlx}}{{lua|Module:Separated entries}} | {{tsh|mlx}}{{lua|Module:Separated entries}} | ||
(often abbreviated <nowiki>{{mlx}}</nowiki>) 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 == | == Examples == | ||
| Line 11: | Line 12: | ||
! Notes | ! Notes | ||
|- | |- | ||
| | | | ||
| {{mlx|Example}} | | {{mlx|Example}} | ||
| Usage without function name. This does not produce a usable invocation. | | Usage without function name. This does not produce a usable invocation. | ||
|- | |- | ||
| | | | ||
| {{mlx|Example|hello}} | | {{mlx|Example|hello}} | ||
| Usage with a function name. | | Usage with a function name. | ||
|- | |- | ||
| | | | ||
| {{mlx|Example|count_fruits|4=bananas=5|5=apples=10}} | | {{mlx|Example|count_fruits|4=bananas=5|5=apples=10}} | ||
| Usage with a function name and parameters. | | Usage with a function name and parameters. | ||
|- | |- | ||
| | | | ||
| {{mlx|Example|count_fruits|bananas{{=}}5|apples{{=}}10}} | | {{mlx|Example|count_fruits|bananas{{=}}5|apples{{=}}10}} | ||
| Usage with a function name and parameters, using | | Usage with a function name and parameters, using =. | ||
|} | |} | ||
| Line 62: | Line 63: | ||
}}</templatedata> | }}</templatedata> | ||
<includeonly>{{Sandbox other|| | <includeonly>{{Sandbox other|| | ||
Latest revision as of 05:23, 14 April 2025
| This page uses Creative Commons Licensed content from Wikipedia (view authors). |
| This is a documentation subpage for Template:Module link expanded It may contain usage information, categories and other content that is not part of the original template page. |
| This template uses Lua: |
(often abbreviated {{mlx}}) 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
| Code | Result | Notes |
|---|---|---|
{{#invoke:Example|function}}
|
Usage without function name. This does not produce a usable invocation. | |
{{#invoke:Example|hello}}
|
Usage with a function name. | |
{{#invoke:Example|count_fruits|bananas=5|apples=10}}
|
Usage with a function name and parameters. | |
{{#invoke:Example|count_fruits|bananas=5|apples=10}}
|
Usage with a function name and parameters, using =. |
TemplateData
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Module link expanded in articles based on its TemplateData.
TemplateData for Module link expanded
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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| module name | 1 | the module name without the namespace prefix “Module:”, which is added automatically | String | required |
| function name | 2 | the function name within the module to call | String | required |
| parameter 1 | 3 | the name (and value) of the first parameter, use {{=}} to add an equal sign | String | optional |
| parameter 2 | 4 | the name (and value) of the second parameter, use {{=}} to add an equal sign | String | optional |
| parameter 3 | 5 | the name (and value) of the third parameter, use {{=}} to add an equal sign | String | optional |