Module:Infobox road/link/GBR

local p = {}

local typesModule = require "Module:Infobox road/link/defs" local Country = typesModule.Country local Link = typesModule.Link

local links = Country:new do -- Motorways local function northernIreland(args) local province = args.province if province == "NI" then args.NI = " (Northern Ireland)" else args.NI = "" end end links["M"] = Link:new{formatStr = "M%s motorway%s", formatArgs = {"route", "NI"}, preprocessors = {northernIreland}} end -- Motorways

do -- A roads local function dab(args) local province = args.province if province == "NI" then args.provdab = " (Northern Ireland)" else args.provdab = " (Great Britain)" end end links["A"] = Link:new{formatStr = "A%s road%s", formatArgs = {"route", "provdab"}, preprocessors = {dab}} end -- A roads

p.links = links return p