About this template
- Description
- This template instructs users on how to install global Lua modules on their wiki.
- Syntax
- Note that all the parameters are optional. See #Parameters for defaults.
{{Lua Install|modulepage = <module pagename>|function = <name of function to use>|invocable = <1/0>|moduleinv = <{{t|{{{modulepage}}}|function|...|i=1}}>|template = <1/0>|templatepage = <template pagename>|templateinv = <{{t|{{{modulepage}}}|function|i=1}}>|templateuse = <{{t|{{{templatepage}}}|...}}>|stylesheet = <1/0>|stylepage = <PAGENAME>}}
- Dependencies
- Module:Install and Module:I18n.
- Translation
- The template translations are stored at:
- Preview
{{Lua Install
| modulepage = Sandbox
| invocable = 1
}}
Parameters
modulepage- Purpose: Page name of the module. It's assumed to be in the Module namespace, so don't include the namespace name.
- Default:
{{SUBPAGENAME}}. function- Purpose: Entrypoint function of the module.
- Default:
main. invocable- Purpose: Whether the module supports direct invocation outside of its module using {{#invoke}}. Accepts
1or0. - Default:
0(false). moduleinv- Dependency:
invocable = 1 - Purpose: Custom module invocation (optional). Use
{{t|i = 1}}. - Default:
.{{t|{{{modulepage}}}|{{{function|main}}}|...|i = 1}} template- Purpose: Whether the module supports templating via the
mainentry point or the specified function. Accepts1or0. - Default:
1(true). templatepage- Dependency:
template = 1 - Purpose: Page name of the template. It's assumed to be in the Template namespace, so don't include the namespace name.
- Default:
{{{modulepage}}}. templateinv- Dependency:
template = 1 - Purpose: Custom template invocation (optional). Use
{{t|i = 1}}. - Default:
.{{t|{{{modulepage}}}|{{{function|main}}}|i = 1}} templateuse- Dependency:
template = 1 - Purpose: Custom template usage (optional). Use
{{t}}. - Default:
.{{t|{{{templatepage}}}|...}} stylesheet- Purpose: Boolean - whether the module has styling (accepts
1or0). - Default:
0 stylepage- Dependency:
stylesheet = 1 - Purpose: Pagename of CSS styling (without extension or namespace).
- Default:
Global Lua Modules/{{{modulepage}}}
TemplateData
Instructs users on how to install global Lua modules on their wiki.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Module Page | modulepage | Custom module name. It's assumed to be in the "Module:" namespace, so don't include the namespace name.
| String | optional |
| Invocable | invocable | Whether the module supports direct invocation outside of its template via {{#invoke}}.
| Boolean | optional |
| Module Invocation | moduleinv | Custom module usage.
| Content | optional |
| Template | template | Whether the module has an accompanying template.
| Boolean | optional |
| Template Page | templatepage | Custom template name. It's assumed to be in the "Template:" namespace, so don't include the namespace name.
| Template | optional |
| Template Contents | templateinv | Custom template contents.
| Content | optional |
| Template Usage | templateuse | Custom template usage.
| Content | optional |
| Requires StyleSheet | stylesheet | Whether the module has a StyleSheet that needs to be installed.
| Boolean | optional |
| StyleSheet Page | stylepage | Custom CSS page name. It's assumed to be in the "MediaWiki:" namespace and have the ".css" extension, so don't include the namespace name or the file extension.
| String | optional |