Template:Lua
![]() | This template usesLua: |
![]() | This template usesLua: |
This template is used to indicate that a template uses one or moreLuamodules (pages in theModule:
namespace). It is placed at the top of the template's /doc page. It automatically adds a floating right notification box, and it adds the template toCategory:Lua-based templatesor to one of its subcategories.
Usage
[kulemba source]- Basic
- {{Lua|module name}}
- All parameters
- {{Lua|module 1|module 2|module 3|...|category=custom category|nocat=true}}
The first module name is required.
Examples
[kulemba source]- {{Lua|Module:Example}}
![]() | This template usesLua: |
- {{Lua|Module:Example|Module:Example}}
![]() | This template usesLua: |
- {{Lua}}
![]() | Error: no modules specified |
Categorisation
[kulemba source]Template category
[kulemba source]This template adds pages toCategory:Lua-based templatesif the page is in the template namespace, and it is not on any of the subpages /doc, /sandbox, /sandbox2 or /testcases. You can specify a different category with the|category=
parameter, e.g.|category=Lua String-based templates
.
Some modules have a default category other thanCategory:Lua-based templates:
- Module:Stringhas the default categoryCategory:Templates based on the String Lua module.
- Module:Mathhas the default categoryCategory:Templates based on the Math Lua module.
- Module:BaseConverthas the default categoryCategory:Templates based on the BaseConvert Lua module.
- Module:Citation/CS1has the default categoryCategory:Templates based on the Citation/CS1 Lua module.
Error category
[kulemba source]If no modules are specified, the transcluded page will be added toCategory:Lua templates with errors.
Category suppression
[kulemba source]To suppress all categorisation, use|nocat=true
.(As well as "true", the values "yes", "y", and "1" will also work.)
TemplateData
[kulemba source]TemplateData for Lua