Module:Data Table

local p = {}

local Franchise = require("Module:Franchise") local utilsArg = require("Module:UtilsArg")

function p.Main(frame) local args, err = utilsArg.parse(frame:getParent.args, p.Templates["Data Table"]) local categories = err and err.categoryText or "" return "", categories end

p.Templates = { ["Data Table"] = { wip = true, format = "block", purpose = " Displays tabular data in a way that is mobile-friendly. Minimizes the amount of boilerplate wikitext that most tables require. Automatically center-aligns columns and applies templates such as, , , etc.  The table data can be stored in Cargo so that the table (or a subset of its rows) can be displayed on other relevant pages.", boilerplate = { separateRequiredParams = false, },		paramOrder = {"storeAs", "game", "columns", "..."}, params = { storeAs = { type = "string", suggested = true, desc = "If present, the data will be stored in the DataTables Cargo table so that it can be retrieved on other pages using .", },			game = { type = "string", required = true, enum = Franchise.enum, desc = "A game code. Used to automatically apply game-based templates (e.g., , ) to table cells.", },			columns = { type = "content", required = true, desc = "Comma-separated list of column headers. One tag can be appended to each column to indicate how the template should handle data in that column. See below.", },			["..."] = {				name = "cells", placeholder = "cell", required = true, type = "content", desc = "Cell values. Type  to separate rows, as shown in the examples below.", }		}	} }

return p