Jump to content

Module:Road data/browsetable

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by BrandonXLF (talk | contribs) at 19:02, 26 July 2024 (Produces a table to contain the output of Module:Road data/browse). 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 getArgs = require('Module:Arguments').getArgs

function p._browsetable(content)
	if not content then return nil end

	local tbl = mw.html.create('table'):addClass('browse-table')
	tbl:wikitext(content)

	return frame:extensionTag{
		name = 'templatestyles', args = { src = 'Module:Road data/browsetable/styles.css' }
	} .. tostring(tbl)
end

function p.browsetable(args)
	local args = getArgs(frame)

	return p._browsetable(args)
end

return p