Module:BundleInfobox

local infobox_utils = require('Module:InfoboxUtils') local item_infobox = require('Module:ItemInfobox') local links = require('Module:Links') local roblox_urls = require('Module:RobloxUrls') local utils = require("Module:Utils") local yesno = require('Dev:Yesno')

local p = {}

function p._format_title(args) if args.id == '' then if args['catalog id'] == '' then return infobox_utils.error_message(" parameter missing") else args.id = args['catalog id'] return item_infobox._format_title(args) end elseif tonumber(args.id) then if tonumber(args.id) <= 0 then return infobox_utils.error_message(" cannot be 0 or less") else return links.external_link(roblox_urls.bundle_from_id(args.id), args.name) end else return infobox_utils.error_message(" must be a number") end end

p.format_title = utils.make_wrapper_function(p._format_title, true)

return p