Module:Tablebuilder/doc
Jump to navigation
Jump to search
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()