local callAssert = require('Module:CallAssert')
local function main(frame, field)
local args, pargs = frame.args, ( frame:getParent() or {} ).args or {}
local makeTitle=args.makeTitle or pargs.makeTitle
local namespace=args.namespace or pargs.namespace or ""
local fragment=args.fragment or pargs.fragment or ""
local interwiki=args.interwiki or pargs.interwiki or ""
local page=args.page or args[1] or pargs.page or pargs[1] or ""
local id= tonumber( args.id or pargs.id )
local pn = {}
local title
for i = 1,9 do pn[i] = args['p'..i] or pargs['p'..i] end
if not id and not mw.ustring.match( page, '%S' ) then page = nil end
if id then
title = callAssert(mw.title.new, 'mw.title.new', id)
elseif not page then
title = callAssert(mw.title.getCurrentTitle, 'getCurrentTitle')