Jump to content

Module:Infobox road

From Simple English Wikipedia, the free encyclopedia
Revision as of 11:11, 30 June 2013 by Happy5214 (talk | changes) (Adding header style function)

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

local p = {}

function p.headerStyle(frame)
    local pframe = frame:getParent()
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template
    
    local headerColor = args.header_color
    if headerColor then
        return "background: " .. headerColor .. ';'
    end
    local colors = require"Module:Infobox road/color"
    return colors.color(frame)
end

return p