View source for Module:Infobox road/meta/mask/subtype2
MyWikiBiz, Author Your Legacy — Sunday June 22, 2025
Jump to navigationJump to searchYou do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
local p = {}
local subtypeDefaults = {Alt = "Alternate", Bus = "Business", Byp = "Bypass", Conn = "Connector", Emerg = "Emergency", Loop = "Loop", Old = "Old",
Opt = "Optional", Scenic = "Scenic", Spur = "Spur", Temp = "Temporary", Toll = "Toll", Truck = "Truck"}
function p._subtype(subtype, subtypes)
setmetatable(subtypes, {__index = subtypeDefaults})
return subtypes[subtype]
end
function p.subtype(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 subtype = config.subtype or args.subtype
local subtypes = {}
subtypes.Alt = args.alt
subtypes.Bus = args.bus
subtypes.Byp = args.byp
subtypes.Conn = args.con
000
1:0
Template used on this page:
Return to Module:Infobox road/meta/mask/subtype2.