Jump to content

Module:Jctint

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Happy5214 (talk | contribs) at 13:30, 22 September 2013 (Adding support for {{{unitary}}}). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local p = {}

local HtmlBuilder = require "Module:HtmlBuilder"

function p.locations(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 root = HtmlBuilder.create()
    
    local unitary = args.unitary or ''
    if unitary ~= '' then
    	local tag = root.tag('td').attr('colspan', '3').wikitext(unitary)
    	local align = args.unitary_align or 'left'
    	tag.css('text-align', align)
	end
	return tostring(root)
end

return p