Module talk:Sandbox/Cqm/I2

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
This talk page is for discussing the Module:Sandbox/Cqm/I2 page.

Infobox.new[edit source]

Usage: infobox.new(args)

Parameters:

  • args: A table representing the arguments passed to the infobox module, as retrieved from the frame table.

Example:

local p = {}
local Infobox = require('Module:Infobox')

function p.main(frame)
    local args = frame:getParent().args
    local infobox = Infobox.new(args)

    -- ...
end

return p

Infobox.addRow[edit source]

Usage: infobox:addRow(args)

Parameters:

  • args: A table representing the attributes of the row and the cells within the row, where each cell is represented by a table. Recognised row attributes are:
    • class: A string or table of strings representing classes to add to the row.
    • 1 - N: All indexed values in args are expected to be table representing cells within the row. Recognised cell attributes are:
      • 1:
      • 2:
      • tag:
      • attr:
      • class:
      • css:
      • colspan:
      • noCalcColspan:
      • rowspan:
      • title:

Example:

infobox:addRow({
    class = 'example-row-class'
    {
        -- @todo
    },
    {
        -- @todo
    }
})