Jump to content

Template:Lua/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
ExE Boss (talk | contribs)
Tag: Reverted
Line 27: Line 27:
{{Lua|nocat=true}}
{{Lua|nocat=true}}
{{clear}}
{{clear}}

{{chart top|An example family tree}}
{{Tree chart/start|align=center}}
{{Tree chart| | | |GrMa |~|y|~| GRP | |GrMa=Grandma|GRP=Grandpa}}
{{Tree chart| | | | | | | |)|-|-|-|.| }}
{{Tree chart| | | MOM |y| DAD | |DAISY|MOM=Mom|DAD=Dad|DAISY=[[Aunt Daisy]]}}
{{Tree chart| |,|-|-|-|+|-|-|-|.| | | }}
{{Tree chart| JOE | | ME | | SIS | | |JOE=My brother Joe|ME='''Me!'''|SIS=My little sister}}
{{Tree chart/end}}
{{chart bottom}}


== Categorisation ==
== Categorisation ==

Revision as of 00:59, 20 July 2021

This template is used to show that templates have been converted to Lua. It is placed at the top of the template's /doc page. It automatically adds the template to Category:Lua-based templates, or to one of its subcategories.

Usage

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

  • {{Lua|Module:Example}}
  • {{Lua|Module:Example|Module:Example}}
An example family tree
GrandmaGrandpa
MomDadAunt Daisy
My brother JoeMe!My little sister

Categorisation

Template category

This template adds pages to Category:Lua-based templates if 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 than Category:Lua-based templates:

Error category

If no modules are specified, the transcluded page will be added to Category:Lua templates with errors.

Category suppression

To suppress all categorisation, use |nocat=true. (As well as "true", the values "yes", "y", and "1" will also work.)

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Lua in articles based on its TemplateData.

TemplateData for Lua

Banner for templates that rely on Lua modules
Module 11
Name of the main module used in the template. Use multiple parameters to specify multiple modules.
Module 22
Name of the second module.
Module 33
Name of the third module.
Module 44
Name of the fourth module.
Module 55
Name of the fifth module.
Module 66
Name of the sixth module.
Module 77
Name of the seventh module.
Module 88
Name of the eighth module.
Module 99
Name of the ninth module.
Module 1010
Name of the tenth module.
No Category?nocat
Whether to disable categorization.
Default
0
Auto value
1
Custom Categorycategory
Main category to put on pages using this template, without namespace prefix.
Default
Lua-based templates

See also