ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Module function link/doc
| ᥢᥣᥲᥘᥤᥐᥲᥟᥢᥴᥢᥭᥳᥢᥭᥳ ᥛᥢᥰᥙᥥᥢᥴ ᥚᥪᥢᥴᥐᥦᥛᥴᥛᥪᥰ ᥘᥣᥭᥰᥓᥬᥳᥖᥪᥰ (documentation) ᥞᥒᥰ ᥖᥩᥢᥲᥖᥣᥱ ᥢᥣᥲᥘᥤᥐᥲᥚᥦᥴ (subpage) ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Module function link ᥢᥢᥳᥕᥝᥴ။ ᥖᥤᥲᥢᥣᥲᥘᥤᥐᥲᥟᥢᥴᥢᥭᥳᥢᥭᥳ ᥛᥢᥰᥖᥥᥴᥑᥝᥲᥙᥣᥰᥝᥭᥳ ᥘᥣᥭᥰᥓᥬᥳᥖᥪᥰ ᥘᥦᥲ ᥑᥩᥲᥑᥣᥝᥱᥟᥢᥴᥐᥥᥝᥱᥐᥙᥴး၊ ᥙᥫᥒᥴᥗᥣᥢᥴ ᥘᥦᥲ ᥑᥩᥲᥛᥧᥢᥰᥖᥣᥒᥱᥓᥫᥰ ᥟᥢᥴᥟᥛᥱᥐᥥᥝᥱᥐᥙᥰ ᥖᥒᥰ ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ page ᥢᥢᥳᥕᥝᥳ။ |
| This template uses Lua: |
{{mfl}} is similar to {{ml}}, but assumes that the function specified is documented, and thus creates a link to a section of the same name expected to be found in the documentation. Another difference with {{ml}} is that the behaviour of empty and undefined in the second parameter here is inverted.
Examples
[ᥛᥥᥰ ᥗᥖᥴ ᥒᥝᥲ ᥒᥣᥱ]| Code | Result | Notes |
|---|---|---|
| {{mfl |
{{#invoke:Example}} | Omits the function name |
| {{mfl |
{{#invoke:Example|hello}} | Usage with a function name. |
| {{mfl |
{{#invoke:Example|count_fruit|bananas=10|kiwis=5}} | Usage with a function name and parameters. |
| {{mfl |
{{#invoke:Example|count_fruit|Fred|bananas=10|apples=5}} | Usage with a function name and parameters, using ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:((=ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:)). |
| {{mfl |
{{#invoke:Example|function}} | Usage with a generic function name. This does not produce a usable invocation. |
TemplateData
[ᥛᥥᥰ ᥗᥖᥴ ᥒᥝᥲ ᥒᥣᥱ]Module function link
This template displays a module name as a link surrounded by braces with the {{#invoke}} parser function, itself linked, 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, expected to be documented | String | optional |
| 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 |
See also
[ᥛᥥᥰ ᥗᥖᥴ ᥒᥝᥲ ᥒᥣᥱ]- {{ml}} - Similar function but without generating links
- {{tl}} - A version of this template for templates instead of modules.
ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Template-linking templates