|Image edit request and support center
- The following guidelines concern
/Datasubpages in the module namespace. These are not to be confused with the pages in
Some modules rely on configuration data to generate output. By convention, this data is placed on a
/Data subpage of the module. Module:Items/Data is an example of such a page — it contains all the data for generating the item navigation templates. Category:Module Data provides the list of such pages.
/Data pages exist to separate module data from the programmed logic that operates on the data. It is a separation of concerns.
/Data pages require less programming knowledge to edit and are meant to be changed more frequently by a wider range of contributors.
Use the "preview page with this" functionality to preview changes to module data.
/Data pages also provide a schema which describes the format and fields for the data page. Currently it may be easier to understand the general format by looking directly at the data, but the schema can at least help you understand in detail what fields exist and what they are for.
How it Works
- Main article: Guidelines:Modules
/Data pages use a subset of regular Lua syntax. They each return one large Lua table which may contain nested tables, strings, numbers, or booleans.
/Data pages resemble JSON files in that regard.
The data is loaded by the base module using
mw.loadData. The data is read-only and is loaded only once per wiki page, as opposed to other module code which is loaded each time it is used on a page (usually via a template).
These pages do not necessarily need to be named with a
/Data suffix — this is only a Zelda Wiki convention that is useful for documentation automation and building a common understanding of the wiki's modules work.