Module:Tablebuilder/doc
< Module:Tablebuilder
Jump to navigation
Jump to search
Revision as of 12:35, 11 January 2022 by Benkoo (talk | contribs) (Created page with "{{Infobox Lua | Type = meta | Author = User:Dessamator }} '''Tablebuilder''' is a meta-module that makes it easier to construct HTML based tables in a wiki. == Descriptio...")
This is the documentation page for Module:Tablebuilder
Template:Infobox Lua Tablebuilder is a meta-module that makes it easier to construct HTML based tables in a wiki.
Description
This module makes use of a scribunto lua library to create, and modify tables dynamically.
Syntax
To create a simple table, follow these steps:
- Import the module:
local tableBuilder = require("Module:Tablebuilder")
- Create a lua table containing rows and columns:
-- Array consisting of rows and columns local tRowData = { -- Row - Columns {"Girls","Boys"}, {"Xena","Hercules"}, {"Athena","Hades"}, }
- Create a new table builder and pass through the tRowData:
local newTable = tableBuilder.new(tRowData)
- Display the table:
local tableOutput = newTable:getTable()