Module:Sandbox/Sameboat/m1

This is an old revision of this page, as edited by Sameboat (talk | contribs) at 02:23, 10 January 2015. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}
 
function p.format11( frame )
	local pframe = frame:getParent()
	local config = frame.args  -- arguments from the template definition
	local args = pframe.args   -- arguments from the page calling the template
	local system = frame.args[1]
	local code = frame.args[2]
    if not system or not code then
        return 'error'
    end
	local data = require('Module:HK-MTR_stations/' .. system)
	local station = data.stations[code]
	return code .. station.id
end
 
return p