Module:VerticalGrid

Revision as of 16:48, 27 November 2025 by HyperNervie (talk | contribs) (Created page with "local p = {} function p.rowNumbers(frame) local args = frame:getParent().args local res = "" local function addRow(s) res = res .. frame:expandTemplate{ title = "VerticalGridCell", args = {s, class = "vgc-row-number"} } end if type(args.heading) == "string" then addRow(args.heading) end for i = 1, tonumber(args[1]) or 0 do addRow(i) end return res end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:VerticalGrid/doc

local p = {}


function p.rowNumbers(frame)
    local args = frame:getParent().args
    local res = ""
    local function addRow(s)
        res = res .. frame:expandTemplate{
            title = "VerticalGridCell",
            args = {s, class = "vgc-row-number"}
        }
    end

    if type(args.heading) == "string" then
        addRow(args.heading)
    end
    for i = 1, tonumber(args[1]) or 0 do
        addRow(i)
    end

    return res
end


return p