Module:Infobox road/sandbox: Difference between revisions

Content deleted Content added
Add browsetable
Use Module:Road data/browsetable
Line 338:
 
--BROWSE LINKS
 
local function browsetable(content)
if not content then return nil end
local tbl = mw.html.create('table'):addClass('browse-table')
tbl:wikitext(content)
return tostring(tbl)
end
 
function p.browsetable(args)
local args = getArgs(frame)
return browsetable(args)
end
 
local function browse(args)
Line 359 ⟶ 347:
local boxModule = require "Module:Road data/browse"
local primary = boxModule._browse(args)
 
return browsetable(primary)
local tblModule = require "Module:Road data/browsetable"
return browsetabletblModule._browsetable(primary)
end
end
Line 369 ⟶ 359:
 
local function extended(args)
iflocal extended = args.nobrowse then return nil end
if notextended content then return nil end
return browsetable(args.browse)
 
local tblModule = require "Module:Road data/browsetable"
return tblModule._browsetable(extended)
end