Fandom

Community Central

Help:Lua

19,805pages on
this wiki
Add New Page
Talk0 Share
Lua-logo-nolabel

Lua is available as a templating language on FANDOM, helping to provide users with the ability to create more maintainable templates, and to improve the performance of some of our slowest pages.

Lua is a different coding experience to basic wikitext templates, resembling a more 'traditional' programming syntax. It offers two key advantages: first and foremost is that logical functionality – 'if', 'else', and 'while' statements along with arrays and variable definition, for instance - is built in to the Lua language, making the implementation of basic logic much easier in Lua than via MediaWiki's other methods. Secondly, because Lua is streamlined for logical operations, it is much more technically efficient.

Enabling and supportEdit

Lua is enabled by default on all wikis. When enabled, the general standard Lua libraries along with the specialized Scribunto libraries are also available. Additionally, InfoboxBuilder will be automatically bundled in the installation.

For more background on the tool read our introduction to Lua and introduction to InfoboxBuilder.

Lua module repository Edit

Lua modules can also be loaded from the FANDOM Open Source Library using require("Dev:ModuleName"), as opposed to require("Module:ModuleName")[1]. These so-called "global modules" are described in more detail here.

Documentation and helpEdit

Lua documentation on the FANDOM Open Source Library:

In addition to this documentation, we have a forum board set up here to ask questions and get help.

See alsoEdit

FANDOM Open Source Library (dev.wikia.com)

Further help and feedbackEdit

ReferencesEdit

  1. User blog:Kirkburn/Technical Update: June 24, 2015